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

Recursive pyupgrade option #339

Closed
dsaxton opened this issue Sep 18, 2020 · 3 comments
Closed

Recursive pyupgrade option #339

dsaxton opened this issue Sep 18, 2020 · 3 comments

Comments

@dsaxton
Copy link

dsaxton commented Sep 18, 2020

Very cool project @asottile! I was curious if there was a way to run pyupgrade on whole directories or projects, and if not whether this might be a helpful feature to add? For instance have pyupgrade -r some_directory run recursively on the directory, or even drop the -r and let the recursive part be implied?

Thanks for building this!

@asottile
Copy link
Owner

dupe #150 #46

@asottile
Copy link
Owner

asottile commented Sep 18, 2020

pre-commit run pyupgrade --all-files or shell globs pyupgrade **/*.py

@saroad2
Copy link

saroad2 commented Oct 16, 2020

pre-commit run pyupgrade --all-files or shell globs pyupgrade **/*.py

I don't think that this is a sufficient solution, because now you are forcing the user to use pre-commit instead of simply using Pyupgrade as a standalone tool.

For instance, I would love to add Pyupgrade as one of the default tools run by Statue, but the absence of the ability to run on directories is the only thing preventing me from doing it.

As I've shown in #344 , Implementation of this ability is quite easy and I hope you reconsider.

Repository owner locked as resolved and limited conversation to collaborators Oct 16, 2020
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

3 participants