-
Notifications
You must be signed in to change notification settings - Fork 39
Support ignore patterns for formatters #359
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
Comments
Thank you for the suggestion! We have marked this issue as "needs decision" to make sure we have a conversation about your idea. We plan to leave this feature request open for at least a month to see how many 👍 votes the opening comment gets to help us make our decision. |
I also need this, I think this would be very useful |
It would be useful to me to be able formatting-ignore the files under |
Black supports |
Black extension works with |
Currently there's an option for linters that allows files to be excluded (
python.linting.ignorePatterns
), but there's not a similar option for formatters as far as I can see.Would it be possible to implement a similar
python.formatting.ignorePatterns
, so that we can configure VSCode to not format, e.g., files from the standard library, or 3rd party packages? In my experiments, the Python extension does invoke the formatter for files in site-packages. I think it's more valuable to protect those kinds of files against accidental formatting, rather than accidental linting.There's a similar issue at microsoft/vscode-python#7047, but that one's about black's inability to hard-exclude files (including files passed on the command line). I'm interested in not invoking the formatter in the first place.
The text was updated successfully, but these errors were encountered: