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

Lint codebase using pyupgrade #11065

Closed
danieleades opened this issue Jan 1, 2023 · 3 comments
Closed

Lint codebase using pyupgrade #11065

danieleades opened this issue Jan 1, 2023 · 3 comments

Comments

@danieleades
Copy link
Contributor

danieleades commented Jan 1, 2023

This repo has previously been linted/upgraded using pyupgrade. Now that python <3.8 has been dropped, and the complex branch structure simplified, it might be a good time to revisit this.

My preferred approach would be to add it to CI using pre-commit.

Might need a maintainer to look at this, as they'll have a better idea which modules need to be whitelisted, etc.

i'm particularly interested in adding pyupgrade, as once in place it can be used to automatically update all the type annotations to the python 3.10+ syntax (supported in python 3.8+ using from __future__ import annotations)

@danieleades
Copy link
Contributor Author

see #10725 (comment)

@AA-Turner
Copy link
Member

i'm particularly interested in adding pyupgrade, as once in place it can be used to automatically update all the type annotations to the python 3.10+ syntax (supported in python 3.8+ using from __future__ import annotations)

This has now been done.

A

@danieleades
Copy link
Contributor Author

i'm particularly interested in adding pyupgrade, as once in place it can be used to automatically update all the type annotations to the python 3.10+ syntax (supported in python 3.8+ using from __future__ import annotations)

This has now been done.

A

you might want to consider adding flake8-future-annotations to make sure the annotations are used consistently. They seem to have been used in some places but not others

@AA-Turner AA-Turner added this to the some future version milestone Apr 29, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants