Skip to content

Commit ff2a2d6

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

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

codespell_lib/_codespell.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,15 +389,13 @@ def _supports_ansi_colors() -> bool:
389389
def parse_options(
390390
args: Sequence[str],
391391
) -> tuple[argparse.Namespace, argparse.ArgumentParser, list[str]]:
392-
393392
# Split lines read from `@PATH` using shlex.split(), otherwise default
394-
# behaviour is to have one arg per line. See:
393+
# behaviour is to have one arg per line. See:
395394
# https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.convert_arg_line_to_args
396395
class ArgumentParser(argparse.ArgumentParser):
397-
def convert_arg_line_to_args(self, arg_line: str
398-
) -> list[str]:
396+
def convert_arg_line_to_args(self, arg_line: str) -> list[str]:
399397
return shlex.split(arg_line)
400-
398+
401399
parser = ArgumentParser(
402400
formatter_class=NewlineHelpFormatter,
403401
fromfile_prefix_chars="@",

codespell_lib/tests/test_basic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1459,6 +1459,7 @@ def test_stdin(tmp_path: Path, capsys: pytest.CaptureFixture[str]) -> None:
14591459
assert stdout == "1: Thsi ==> This\n"
14601460
assert code == 1
14611461

1462+
14621463
def test_args_from_file(
14631464
tmp_path: Path,
14641465
capsys: pytest.CaptureFixture[str],
@@ -1471,7 +1472,7 @@ def test_args_from_file(
14711472
fname1.write_text("abandonned\ncode")
14721473
fname2.write_text("exmaple\n")
14731474
fname3.write_text("abilty\n")
1474-
print(f'@{fname_list}')
1475+
print(f"@{fname_list}")
14751476
result = cs.main(f"@{fname_list}", std=True)
14761477
assert isinstance(result, tuple)
14771478
code, stdout, stderr = result

0 commit comments

Comments
 (0)