-
-
Notifications
You must be signed in to change notification settings - Fork 582
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
how to prevent isort from sorting subfolders #1724
Comments
Hi @epogrebnyak, the documentation can be a little intimidating at first read. Have you seen this section https://pycqa.github.io/isort/docs/configuration/options/? There are a few configuration skip settings that could help you, notably |
Thanks for the guidance! I'm currently doing As a suggestion - can similar skpping pattern be incorporated to isort default as in black? A lot of people use two tools together, reasonable to extect similar behaviour. I can try dig into configuration for black default if anyone endorses that. |
Glad that worked! Again, I'll note that the option Black by default excludes these paths As an action item from this @timothycrosley probably if an isort-black inter-op doc is ever created (#1518) there should be mention that |
Many thanks for supporting isort!
I run into a curious issue: when running isort over a a folder where there was an environment subfolder
.env
and isort picked up sorting the imports in all the installed packages, which resulted in further error.When I run
black .
the formatting affects just .py files in my project, does not affect files form .gitignore.When I run
isort .
the changes affect everything in subfolders. How do I prevent this behavior? I studied documentation andisort --help
, but could not think of a good option.So far I resort to
isort specific_file.py
The text was updated successfully, but these errors were encountered: