Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97327

Visual Studio Code> Python > Black formatting does not run on save

$
0
0

Although I seem to have configured both linitng and formatting properly, the linting runs but the black formatting does not.

"python.linting.flake8Enabled": true,
    "python.linting.flake8Args": [
        "--max-line-length=110"
    ],
    "python.linting.lintOnSave": true,
    "python.formatting.provider": "black",
    "python.formatting.blackPath": "/usr/local/bin/black",
    "python.formatting.blackArgs": [
        "--line-length",
        "110"
    ],
    "editor.formatOnSave": true,

I have checked, that black is properly configured and I can run the formatting from the command-line without issues.

But when saved in the IDE, black does not format the file. It also does not complain, there are no error-messages that pop up and nothing showing up in the logs. It just does not run the formatting at all.

I am running this insisde a docker-container using remote-editing: not sure, if this makes a difference.

The black-version is:

black>=19.3b0

and the vscode-version is 1.36.1.

Thx for any help, as right now I am pretty clueless, why the black-formatting does not run...


Viewing all articles
Browse latest Browse all 97327

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>