I have started using Python and Django and I am very new in this field. And, this is my first time to ask a question here...I do apologise in advance if there is a known solution to this issue...
When I installed and set VSCode formatter 'black' (after setting linter as flake8), the tutorial video tutor's side shows up pop-up like 'formatter autopep8 is not installed. install?'. & Mine did not show up that message.
So what I did was...
manually input 'pipenv install flack --dev --pre' on terminal.
manually input "python.formatting.provider": "black", to 'settings.json' on '.vscode' folder.
Setting(VSCode) -> flake8, Python > Linting: Flake8 Enabled (Also modified in: workspace), (ticked the box) Whether to lint Python files using flake8
The bottom code is from settings.json (on vscode folder).
{
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "black", # input manually
"python.linting.flake8Args": ["--max-line-length=88"] # input manually
}
I found a 'black formatter' document. https://github.com/psf/black & it stated... python -m black {source_file_or_directory} & I get the following error message.
Usage: __main__.py [OPTIONS] [SRC]...
Try '__main__.py -h' for help.
Error: Invalid value for '[SRC]...': Path '{source_file_or_directory}' does not exist.
Yes, honestly, I am not sure which source_file_or_directory I should set...but above all now I am afraid whether I am on the right track or not.
Can I hear your advice? At least some direction to go, please. Thanks..