Skip to content

Apply ruff/pyupgrade rules (UP)#330

Open
DimitriPapadopoulos wants to merge 2 commits intopypa:mainfrom
DimitriPapadopoulos:UP
Open

Apply ruff/pyupgrade rules (UP)#330
DimitriPapadopoulos wants to merge 2 commits intopypa:mainfrom
DimitriPapadopoulos:UP

Conversation

@DimitriPapadopoulos
Copy link
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
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
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
Contributor Author

Indeed a rebase error. Fixed now.

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