Skip to content

Commit

Permalink
Enforce --write-changes in interactive mode
Browse files Browse the repository at this point in the history
  • Loading branch information
MercuryDemo authored and DimitriPapadopoulos committed Jul 26, 2024
1 parent a28e3c7 commit b67fe45
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions codespell_lib/_codespell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b67fe45

Please sign in to comment.