Skip to content

Apply ruff/pyupgrade rules (UP)#330

Merged
miketheman merged 3 commits intopypa:mainfrom
DimitriPapadopoulos:UP
Apr 10, 2026
Merged

Apply ruff/pyupgrade rules (UP)#330
miketheman merged 3 commits intopypa:mainfrom
DimitriPapadopoulos:UP

Conversation

@DimitriPapadopoulos
Copy link
Copy Markdown
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented Aug 5, 2025

I would suggest testing with ruff in addition to, or instead of flake8. This prepares such a change.

Requires #328 and #332 to pass CI tests.

Copy link
Copy Markdown
Member

@miketheman miketheman left a comment

Choose a reason for hiding this comment

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

A lot of these changes are not compliant with the minimum supported version of Python

@DimitriPapadopoulos
Copy link
Copy Markdown
Contributor Author

A lot of these changes are not compliant with the minimum supported version of Python

That would be surprising, Ruff automatically takes into account the minimum supported version of Python:

requires-python = ">=3.10"

The CI errors might have been caused by a human error. Let me have a look.

UP006 Use `dict` instead of `Dict` for type annotation
UP006 Use `list` instead of `List` for type annotation
UP006 Use `set` instead of `Set` for type annotation
UP035 Import from `collections.abc` instead: `Callable`
UP035 Import from `re` instead: `Match`
@DimitriPapadopoulos
Copy link
Copy Markdown
Contributor Author

Indeed a rebase error. Fixed now.

Copy link
Copy Markdown
Member

@miketheman miketheman left a comment

Choose a reason for hiding this comment

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

Thanks!

@miketheman miketheman merged commit fdc4733 into pypa:main Apr 10, 2026
10 checks passed
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.

2 participants