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

Add pyupgrade pre-commit hook #712

Merged
merged 2 commits into from
Jun 23, 2022
Merged

Conversation

jarrodmillman
Copy link
Collaborator

We've been using pyupgrade for several projects and I recommend it.

@jarrodmillman jarrodmillman added this to the 0.9.1 milestone Jun 10, 2022
@choldgraf
Copy link
Collaborator

+1 from me - it should only run when Python versions are deprecated anyway, so I don't think it'll generate much noise right?

@12rambau
Copy link
Collaborator

I'm not in the Python game for long enough to realize how useful these tools can be. So nothing to add, if you think it's useful and if it's harmless let's make it happen

@jarrodmillman jarrodmillman changed the title Pyupgrade Add pyupgrade pre-commit hook Jun 10, 2022
@jarrodmillman
Copy link
Collaborator Author

+1 from me - it should only run when Python versions are deprecated anyway, so I don't think it'll generate much noise right?

Correct. It shouldn't generate much noise and will ensure PRs use modern syntax and constructions. After we deprecate old Python versions, we can upgrade the flag and files in one commit, which we can add the commit hash to .git-blame-ignore-revs. For example, https://github.com/networkx/networkx/blob/main/.git-blame-ignore-revs

@jarrodmillman
Copy link
Collaborator Author

See #713.

@choldgraf choldgraf merged commit 7338b07 into pydata:main Jun 23, 2022
@choldgraf
Copy link
Collaborator

Just realized we didn't merge this one in, sorry @jarrodmillman for dropping it, and thanks for the contrib!

@jarrodmillman jarrodmillman modified the milestones: 0.9.1, 0.10 Jul 1, 2022
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.

3 participants