Skip to content

Commit fae12eb

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

2 files changed

Lines changed: 7 additions & 8 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: 4 additions & 3 deletions
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],
@@ -1478,6 +1479,6 @@ def test_args_from_file(
14781479
assert "/tmp2:1: exmaple ==> example\n" in stdout, f"{stdout=}"
14791480
assert "/tmp3:1: abilty ==> ability\n" in stdout, f"{stdout=}"
14801481
assert code == 3, f"{code=}"
1481-
#assert "SUMMARY" in stdout
1482-
#assert len(stdout.split("\n")) == 7
1483-
#assert "abandonned" in stdout.split()[-2]
1482+
# assert "SUMMARY" in stdout
1483+
# assert len(stdout.split("\n")) == 7
1484+
# assert "abandonned" in stdout.split()[-2]

0 commit comments

Comments
 (0)