0

I've installed black formatting in the venv directory of my project. In my project, I have, among other files: .vscode/settings.json and djblogger/djblogger/settings/base.py

in the settings.json is the following:

"editor.formatOnSave": false, // enable per language
"[python]": {
    "editor.formatOnSave": true
},
"python.formatting.provider": "black",
// Workspace Settings
"python.formatting.blackPath": "/Users/Owner/Documents/GitHub/django-project-djblogger/venv/Scripts",
"python.formatting.blackArgs": [
    "-l 120"
],

When I add extra blank lines in settings.json, then save, the blank lines are removed.

When I add extra blank lines in base.py, then save, the blank lines are not removed.

How do I get black formatting to work for all files, not just settings.json?

1 Answer 1

0

According to documentation You can use

black {source_file_or_directory}

So try to point path to Your main project folder

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.