File tree Expand file tree Collapse file tree 3 files changed +23
-8
lines changed
Expand file tree Collapse file tree 3 files changed +23
-8
lines changed Original file line number Diff line number Diff line change 1+ [flake8]
2+
3+ # Ruff set to 79, but we have some noqa comments which are a bit longer, and wemake does not forgive that
4+ max-line-length = 88
5+ # Suppress WPS410 warning
6+ allowed-module-metadata =__all__
7+
8+ ignore =
9+ # Allow relative imports to the current folder.
10+ WPS300,
11+
12+
13+ per-file-ignores =
14+ # Tests contain similar string literals
15+ tests/pytest/_cli_test.py: WPS226
Original file line number Diff line number Diff line change @@ -33,28 +33,28 @@ def invoke_cli_app(cli_args: list[str]) -> ReturnCodeType:
3333 parsed_cli_args .invoke_cli_app ,
3434 )
3535
36- try :
36+ try : # noqa: WPS225 - too many `except` cases
3737 return invoke_cli_app (parsed_cli_args )
3838 except PreCommitTerraformExit as exit_err :
39- # T201 - FIXME here and below - we will replace 'print' with
40- # logging later
41- print (f'App exiting: { exit_err !s} ' , file = sys .stderr ) # noqa: T201
39+ # T201,WPS421 - FIXME here and below - we will replace 'print'
40+ # with logging later
41+ print (f'App exiting: { exit_err !s} ' , file = sys .stderr ) # noqa: T201,WPS421
4242 raise
4343 except PreCommitTerraformRuntimeError as unhandled_exc :
44- print ( # noqa: T201
44+ print ( # noqa: T201,WPS421
4545 f'App execution took an unexpected turn: { unhandled_exc !s} . '
4646 'Exiting...' ,
4747 file = sys .stderr ,
4848 )
4949 return ReturnCode .ERROR
5050 except PreCommitTerraformBaseError as unhandled_exc :
51- print ( # noqa: T201
51+ print ( # noqa: T201,WPS421
5252 f'A surprising exception happened: { unhandled_exc !s} . Exiting...' ,
5353 file = sys .stderr ,
5454 )
5555 return ReturnCode .ERROR
5656 except KeyboardInterrupt as ctrl_c_exc :
57- print ( # noqa: T201
57+ print ( # noqa: T201,WPS421
5858 f'User-initiated interrupt: { ctrl_c_exc !s} . Exiting...' ,
5959 file = sys .stderr ,
6060 )
Original file line number Diff line number Diff line change @@ -109,6 +109,6 @@ def invoke_cli_app(parsed_cli_args: Namespace) -> ReturnCodeType:
109109 # hook, so leave as is
110110 except subprocess .CalledProcessError as e : # noqa: PERF203
111111 # T201 - Leave print statement as is, as this is deprecated hook
112- print (e ) # noqa: T201
112+ print (e ) # noqa: T201,WPS421
113113 retval = ReturnCode .ERROR
114114 return retval
You can’t perform that action at this time.
0 commit comments