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

Bump ruff to 0.2.0 #114932

Merged
merged 1 commit into from
Feb 2, 2024
Merged

Bump ruff to 0.2.0 #114932

merged 1 commit into from
Feb 2, 2024

Conversation

AlexWaygood
Copy link
Member

Fix these DeprecationWarnings if you run ruff directly on Lib/test or Tools/clinic (which unfortunately you don't see if you run it via pre-commit, since pre-commit swallows all output from the underlying hook unless the hook returns a non-zero exit code):

warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `Lib\test\.ruff.toml`:
  - 'select' -> 'lint.select'
warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `Tools\clinic\.ruff.toml`:
  - 'ignore' -> 'lint.ignore'
  - 'select' -> 'lint.select'
  - 'unfixable' -> 'lint.unfixable'

@AlexWaygood
Copy link
Member Author

Tools/clinic/.ruff.toml doesn't exist on the 3.11 branch, but Lib/test/.ruff.toml does, so backporting to 3.11 can't be done automatically :/

I think the 3.12 one should be fine, though 🤞

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

Thanks!

@hugovk
Copy link
Member

hugovk commented Feb 2, 2024

(which unfortunately you don't see if you run it via pre-commit, since pre-commit swallows all output from the underlying hook unless the hook returns a non-zero exit code)

(Or unless you run with the --verbose flag.)

Tools/clinic/.ruff.toml doesn't exist on the 3.11 branch, but Lib/test/.ruff.toml does, so backporting to 3.11 can't be done automatically :/

Sounds like we should add Tools/clinic/.ruff.toml to the 3.11 branch at the same time?

@AlexWaygood AlexWaygood merged commit 920b89f into python:main Feb 2, 2024
34 checks passed
@AlexWaygood AlexWaygood deleted the ruff-bump branch February 2, 2024 21:04
@miss-islington-app
Copy link

Thanks @AlexWaygood for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 2, 2024
(cherry picked from commit 920b89f)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Feb 2, 2024

GH-114935 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Feb 2, 2024
AlexWaygood added a commit that referenced this pull request Feb 2, 2024
Bump ruff to 0.2.0 (GH-114932)
(cherry picked from commit 920b89f)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@AlexWaygood
Copy link
Member Author

AlexWaygood commented Feb 2, 2024

Sounds like we should add Tools/clinic/.ruff.toml to the 3.11 branch at the same time?

Hmm maybe... I don't think it'll pass on the 3.11 branch though... But maybe that doesn't matter, since we won't actually run the check in CI?

But it's pretty rare that we'll want to update the .ruff.toml file at the same time as .pre-commit-config.yaml, so this feels like it might be a bit of a "one-off" problem that maybe doesn't need a generalised solution?

@hugovk
Copy link
Member

hugovk commented Feb 2, 2024

OK, let's skip it for 3.11 :)

@bedevere-app
Copy link

bedevere-app bot commented Feb 4, 2024

GH-115008 is a backport of this pull request to the 3.11 branch.

AlexWaygood added a commit to AlexWaygood/cpython that referenced this pull request Feb 4, 2024
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this pull request Feb 14, 2024
@AlexWaygood AlexWaygood restored the ruff-bump branch February 22, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants