Can't exclude specified file from auto formatting when using autopep8 #17148
-
Can anyone help me to ignore the "settings.py" file in a Django project to be formatted on save? I have tried for 2 hours but couldn't get it to work. I am using Windows 10. My vscode configurations: {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[python]": {
"editor.defaultFormatter": "ms-python.python",
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.formatOnSave": true
},
"python.formatting.autopep8Args": ["--exclude=settings.py"]
} I also tried: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
There isn't a VS Code-specific way to ignore a single file for formatting while you have BTW any of the attempts which have spaces in the string will not work as those will get passed as a single argument to autopep8, e.g. Have you looked at the Output Panel for the extension to see if there are any error messages? Or have you tried the command manually at the command-line to make sure it works there to begin with? |
Beta Was this translation helpful? Give feedback.
-
Moved to #17188 as a bug |
Beta Was this translation helpful? Give feedback.
Moved to #17188 as a bug