diff --git a/codespell_lib/_codespell.py b/codespell_lib/_codespell.py index 0ff66c822f..c7cc63bcfe 100644 --- a/codespell_lib/_codespell.py +++ b/codespell_lib/_codespell.py @@ -1126,6 +1126,9 @@ def main(*args: str) -> int: for ifile, cfg_file in enumerate(used_cfg_files, start=1): print(f" {ifile}: {cfg_file}") + if options.interactive > 0: + options.write_changes = True + if options.regex and options.write_changes: return _usage_error( parser, diff --git a/codespell_lib/data/dictionary.txt b/codespell_lib/data/dictionary.txt index a2cfb8f171..31d428c95b 100644 --- a/codespell_lib/data/dictionary.txt +++ b/codespell_lib/data/dictionary.txt @@ -32347,6 +32347,8 @@ infalte->inflate infalted->inflated infaltes->inflates infalting->inflating +infastructure->infrastructure +infastructures->infrastructures infectuous->infectious infered->inferred inferface->interface diff --git a/codespell_lib/tests/test_basic.py b/codespell_lib/tests/test_basic.py index 722259245c..74e10404e1 100644 --- a/codespell_lib/tests/test_basic.py +++ b/codespell_lib/tests/test_basic.py @@ -243,8 +243,6 @@ def test_interactivity( cs.main("-i", "-1", fname) assert e.type is SystemExit assert e.value.code != 0 - with FakeStdin("y\n"): - assert cs.main("-i", "3", fname) == 1 with FakeStdin("n\n"): result = cs.main("-w", "-i", "3", fname, std=True) assert isinstance(result, tuple) diff --git a/pyproject.toml b/pyproject.toml index feeb1e186e..1c5f6c103a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -169,6 +169,6 @@ max-complexity = 45 [tool.ruff.lint.pylint] allow-magic-value-types = ["bytes", "int", "str",] max-args = 13 -max-branches = 47 +max-branches = 48 max-returns = 12 max-statements = 119