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 --check-only and --diff options #840

Closed
wants to merge 2 commits into from

Conversation

ThomasFaivre
Copy link

Hi all,

I would like to be able to visualize what modifications would be applied by pyupgrade without modifying files on disk.

These are options that are available in other linting tools like black, isort, autoflake, and others.

What do you think?

I am hesitating between --check and --check-only because we see both in other tools.
I would also like to see some colors on the diff (I like colors! :D), but that would require either some external library (which can be annoying) or handling terminal color codes in pyupgrade directly (which can be annoying aswell). I can be a separate PR though!

Last thing, would it be possible to have a version 3.3.3 with these patches so that it can be available for Python 3.7? I don't have much ground to stand on for this as it is the version for Debian 10 which is oldoldstable since Saturday ^^
Your call!

Thanks!

Usefull to only report what file would be changed by appyling pyupgrade.

Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
In conjunction with --check-only, useful to see what would be changed by
applying pyupgrade.

Signed-off-by: Thomas Faivre <thomas.faivre@6wind.com>
@ThomasFaivre
Copy link
Author

Hello,

Can I have more information on the reason for this PR being closed?
Is it the feature itself?
Or me trying to fix the Windows issue triggering CI?

Thanks for the help!

@asottile
Copy link
Owner

general open source advice:

(1) search the issue tracker for duplicates
(2) start with an issue, especially for large feature work

Repository owner locked as resolved and limited conversation to collaborators Jun 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants