Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add pyupgrade to pre-commit hooks#9682

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
auvipy merged 1 commit intoencode:masterfromulgens:pyupgrade-precommit
Apr 9, 2025

Conversation

ulgens
Copy link
Contributor

@ulgensulgens commentedApr 8, 2025
edited
Loading

Description

Inspired from@browniebroke 'sPR We can and we should automate this type of checks.pyupgrade is a great tool to do that and we already hadpre-commit setup in place.

I tried to minimize the changes by excluding%s to f-string conversions but it looks like the code was a bit neglected so the resulting changes are still not so small.

This looks like nitpicking and "churn", but in my experience,pyupgrade anddjango-upgrade helps a lot to minimize the maintenance efforts.

@browniebroke
Copy link
Member

Yes, I considered adding pyupgrade to do my previous PR, but consciously chose not to as I thought it would introduce more churn than what I was aiming for, but to be honest I was expecting a bigger diff than that. I assume that disabling percent-formt to f-string is helping a lot.

... in my experience, pyupgrade and django-upgrade helps a lot to minimize the maintenance efforts

It could indeed help us cleanup old branches from#9681 as the project drops support for old versions, so might pay off in the long run

@ulgens
Copy link
ContributorAuthor

ulgens commentedApr 8, 2025
edited
Loading

@browniebroke Removing the--keep-percent-format arg creates an additional diff of24 files changed, 43 insertions(+), 43 deletions(-); which I still think it's not that big but feels more churn-y. Having all changes handled in a single commit is another option.

I wanted to go with minimal changes to be safer but we can use it without excluding any rules.

@browniebroke
Copy link
Member

I wanted to go with minimal changes to be safer but we can use it without excluding any rules.

Yes I agree, that makes sense to keep changes to a minimum 👍

ulgens reacted with thumbs up emoji

Copy link
Member

@auvipyauvipy left a comment

Choose a reason for hiding this comment

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

looks good

@auvipyauvipy requested a review fromCopilotApril 9, 2025 06:21
Copy link

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.

@auvipyauvipy merged commitea1da76 intoencode:masterApr 9, 2025
7 checks passed
@ulgensulgens deleted the pyupgrade-precommit branchApril 9, 2025 07:08
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@auvipyauvipyauvipy approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@ulgens@browniebroke@auvipy

[8]ページ先頭

©2009-2025 Movatter.jp