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

Recommended command recurses into my virtualenv #278

Closed
adamchainz opened this issue Dec 16, 2020 · 1 comment · Fixed by #287
Closed

Recommended command recurses into my virtualenv #278

adamchainz opened this issue Dec 16, 2020 · 1 comment · Fixed by #287
Labels
enhancement New feature or request

Comments

@adamchainz
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I ran the recommended command in usage, djcodemod run --deprecated-in 3.0 . . I wondered how there were 10k files to modify before realizing it's recursing into my virtualenv and rewriting everything there.

Describe the solution you'd like
A minimal solution would be to say not recommend . as the path.

A more complete solution would be to check if a folder looks like a virtualenv (e.g. has a "bin/activate") before recursing into it.

Additional context
n/a

@adamchainz adamchainz added the enhancement New feature or request label Dec 16, 2020
@browniebroke
Copy link
Owner

Right... I agree that -at least- the documentation should be updated to not recomment .. I'm not sure about guessing exclusion rules, though.

Someone also mentioned an option to exclude some folders #264 which could default to a list of common things which should be excluded. The --exclude option from black would probably be a good starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants