Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove a branch from main() to pass Ruff CI check. #2962

Merged
merged 1 commit into from
Jul 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions codespell_lib/_codespell.py
Original file line number Diff line number Diff line change
Expand Up @@ -1063,10 +1063,8 @@ def main(*args: str) -> int:
return EX_USAGE
uri_ignore_words = parse_ignore_words_option(options.uri_ignore_words_list)

if options.dictionary:
dictionaries = options.dictionary
else:
dictionaries = ["-"]
dictionaries = options.dictionary if options.dictionary else ["-"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be equivalently expressed more compactly like this but what you have is fine, too

Suggested change
dictionaries = options.dictionary if options.dictionary else ["-"]
dictionaries = options.dictionary or ["-"]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know! Haven't seen that syntax before.


use_dictionaries = []
for dictionary in dictionaries:
if dictionary == "-":
Expand Down