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

Apply assorted ruff rules #1415

Merged
merged 8 commits into from
May 20, 2024
Merged

Conversation

DimitriPapadopoulos
Copy link
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented May 18, 2024

  • I have added a news fragment under changelog.d/ (if the patch affects the end users)

Summary of changes

Response to #1408 (comment).

I tried ruff check --select=ALL and applied rules that are not pedantic and avoid extensive changes.

Test plan

Tested by running

$ ruff check --extend-select EXE001,PERF401,RET504,SIM910,TRY300,UP021,UP031
All checks passed!
$ 

RET504 Unnecessary assignment to `...` before `return` statement
SIM910 Use `json_dict.get(...)` instead of `json_dict.get(..., None)`
UP021 `universal_newlines` is deprecated, use `text`
UP031 Use format specifiers instead of percent format
TRY300 Consider moving this statement to an `else` block
PERF401 Use a list comprehension to create a transformed list
EXE001 Shebang is present but file is not executable
Copy link
Contributor

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

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

@gaborbernat gaborbernat merged commit 4b905e0 into pypa:main May 20, 2024
11 checks passed
@DimitriPapadopoulos DimitriPapadopoulos deleted the assorted branch May 20, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants