Skip to content

Commit

Permalink
Process files in sorted rather than arbitrary order (#3234)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Nov 27, 2023
1 parent ebcb9d9 commit cd1a217
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions codespell_lib/_codespell.py
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ def main(*args: str) -> int:
return EX_USAGE

bad_count = 0
for filename in options.files:
for filename in sorted(options.files):
# ignore hidden files
if is_hidden(filename, options.check_hidden):
continue
Expand All @@ -1190,7 +1190,7 @@ def main(*args: str) -> int:
continue
if is_hidden(root, options.check_hidden): # dir itself hidden
continue
for file_ in files:
for file_ in sorted(files):
# ignore hidden files in directories
if is_hidden(file_, options.check_hidden):
continue
Expand Down

0 comments on commit cd1a217

Please sign in to comment.