Skip to content

Commit 3223cfd

Browse files
committed
FURB113 - Use procArgs.extend(...) instead of repeatedly calling procArgs.append()
1 parent 93898c9 commit 3223cfd

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

src/pre_commit_terraform/terraform_docs_replace.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,15 @@ def invoke_cli_app(parsed_cli_args: Namespace) -> ReturnCodeType:
7171
procArgs.append('terraform-docs')
7272
if cast_to(bool, parsed_cli_args.sort):
7373
procArgs.append('--sort-by-required')
74-
procArgs.append('md')
75-
procArgs.append('./{dir}'.format(dir=dir))
76-
procArgs.append('>')
77-
procArgs.append(
78-
'./{dir}/{dest}'.format(
79-
dir=dir, dest=cast_to(bool, parsed_cli_args.dest),
74+
procArgs.extend(
75+
(
76+
'md',
77+
'./{dir}'.format(dir=dir),
78+
'>',
79+
'./{dir}/{dest}'.format(
80+
dir=dir,
81+
dest=cast_to(bool, parsed_cli_args.dest),
82+
),
8083
),
8184
)
8285
subprocess.check_call(' '.join(procArgs), shell=True)

0 commit comments

Comments
 (0)