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

Update ruff to v0.3.6 #12595

Merged
merged 5 commits into from
Apr 14, 2024
Merged

Update ruff to v0.3.6 #12595

merged 5 commits into from
Apr 14, 2024

Conversation

notatallshaw
Copy link
Member

@notatallshaw notatallshaw commented Mar 24, 2024

Updating ruff to v0.3.4 caused two rules to fail, and fixing them caused a third one to fail:

  • F401 - Unused imports, this seems like a bug fix on ruff side, these should have been caught before
  • UP032 - Use f-strings instead of .format, previously this rule was not applied if it would cause the string to exceed the maximum line length, it was decided to change this behavior: [pyupgrade] Allow fixes for f-string rule regardless of line length (UP032) astral-sh/ruff#10263
  • E501 - With the autofix of UP032 several lines exceeded the maximum line length, with no autofix available I manually fixed each line, in a lot of cases I tried to make what I thought was the best aesthetic choice, in two cases, both multi-line f-strings I was unsure how to handle and instead disabled E501 for those strings. Feel free to give feedback and I will update appropriately.

The other option would be to remove UP032 from the ruff rule selection.

Copy link
Member

@sbidoul sbidoul left a comment

Choose a reason for hiding this comment

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

Thanks! One blocking issue in __pip-runner__.py and two minor comments from my side.

src/pip/__pip-runner__.py Outdated Show resolved Hide resolved
tests/functional/test_new_resolver_hashes.py Outdated Show resolved Hide resolved
tests/functional/test_build_env.py Outdated Show resolved Hide resolved
@notatallshaw
Copy link
Member Author

Updated to 0.3.5 and rebased, no issues found.

@notatallshaw notatallshaw changed the title Update ruff to v0.3.4 Update ruff to v0.3.6 Apr 13, 2024
@notatallshaw
Copy link
Member Author

Updated to 0.3.6 and rebased, no issues found.

@sbidoul sbidoul merged commit 551e822 into pypa:main Apr 14, 2024
24 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants