Skip to content

Commit c12c94b

Browse files
committed
Not try to fix WPS111 in a way that does not improve code
1 parent 6687da9 commit c12c94b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/pre_commit_terraform/terraform_docs_replace.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,14 @@ def invoke_cli_app(parsed_cli_args: Namespace) -> ReturnCodeType: # noqa: WPS23
105105
),
106106
)
107107
# S602 - 'shell=True' is insecure, but this hook is deprecated and
108-
# we don't want to spent time on testing fixes for it
108+
# we don't want to spent time on testing fixes for it\
109109
subprocess.check_call(' '.join(proc_args), shell=True) # noqa: S602
110110
# PERF203 - try-except shouldn't be in a loop, but it's deprecated
111111
# hook, so leave as is
112-
except subprocess.CalledProcessError as err: # noqa: PERF203
113-
# T201 - Leave print statement as is, as this is deprecated hook
114-
print(err) # noqa: T201,WPS421
112+
# WPS111 - Too short var name, but it's deprecated hook, so leave as is
113+
except subprocess.CalledProcessError as e: # noqa: PERF203,WPS111
114+
# T201,WPS421 - Leave print statement as is, as this is
115+
# deprecated hook
116+
print(e) # noqa: T201,WPS421,WPS111
115117
retval = ReturnCode.ERROR
116118
return retval

0 commit comments

Comments
 (0)