Skip to content

Commit d775d5a

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c08d7d9 commit d775d5a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/pre_commit_terraform/_cli.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def invoke_cli_app(cli_args: list[str]) -> ReturnCodeType:
2828
root_cli_parser = initialize_argument_parser()
2929
parsed_cli_args = root_cli_parser.parse_args(cli_args)
3030
invoke_cli_app = cast_to(
31-
# FIXME: attempt typing per https://stackoverflow.com/a/75666611/595220 # noqa: TD001, TD002, TD003, FIX001, E501 All these suppressions caused by "FIXME" comment
31+
# FIXME: attempt typing per https://stackoverflow.com/a/75666611/595220 # noqa: TD001, TD002, FIX001, E501 All these suppressions caused by "FIXME" comment
3232
'CLIAppEntryPointCallableType',
3333
parsed_cli_args.invoke_cli_app,
3434
)
@@ -38,24 +38,24 @@ def invoke_cli_app(cli_args: list[str]) -> ReturnCodeType:
3838
except PreCommitTerraformExit as exit_err:
3939
# T201 - FIXME here and below - we will replace 'print' with
4040
# logging later
41-
print(f'App exiting: {exit_err !s}', file=sys.stderr) # noqa: T201
41+
print(f'App exiting: {exit_err!s}', file=sys.stderr) # noqa: T201
4242
raise
4343
except PreCommitTerraformRuntimeError as unhandled_exc:
4444
print( # noqa: T201
45-
f'App execution took an unexpected turn: {unhandled_exc !s}. '
45+
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:
5151
print( # noqa: T201
52-
f'A surprising exception happened: {unhandled_exc !s}. Exiting...',
52+
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:
5757
print( # noqa: T201
58-
f'User-initiated interrupt: {ctrl_c_exc !s}. Exiting...',
58+
f'User-initiated interrupt: {ctrl_c_exc!s}. Exiting...',
5959
file=sys.stderr,
6060
)
6161
return ReturnCode.ERROR

src/pre_commit_terraform/_cli_parsing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def initialize_argument_parser() -> ArgumentParser:
3737
Returns:
3838
ArgumentParser: The root parser with sub-commands attached.
3939
"""
40-
root_cli_parser = ArgumentParser(prog=f'python -m {__package__ !s}')
40+
root_cli_parser = ArgumentParser(prog=f'python -m {__package__!s}')
4141
attach_subcommand_parsers_to(root_cli_parser)
4242
return root_cli_parser
4343

tests/pytest/_cli_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def invoke_cli_app(self, parsed_cli_args: Namespace) -> ReturnCodeType:
6969
assert invoke_cli_app(['sentinel']) == ReturnCode.ERROR
7070

7171
captured_outputs = capsys.readouterr()
72-
assert captured_outputs.err == f'{expected_stderr !s}\n'
72+
assert captured_outputs.err == f'{expected_stderr!s}\n'
7373

7474

7575
def test_app_exit(

0 commit comments

Comments
 (0)