Severity of `pydocstyle` possibly incorrect
See original GitHub issueApologies if this isn’t the right place for this issue.
If it’s actually an issue with the language server or pydocstyle
I’ll close this and open it there.
Environment data
- VS Code version: 1.56.2
- Extension version (available under the Extensions sidebar): 2021.5.842923320
- OS and version: Ubuntu 20.04.2 LTS
- Python version (& distribution if applicable, e.g. Anaconda): Python 3.9.5, Miniconda
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): Miniconda 4.10.1
- Relevant/affected Python packages and their versions: pydocstyle 6.1.1
- Relevant/affected Python-related VS Code extensions and their versions: ? Pylance 2021.5.4
- Value of the
python.languageServer
setting: Pylance
Expected behaviour
I wanted my pydocstyle
to be ‘Information’ (blue underline).
pycodestyle
has some nice settings for this, like
python.linting.pycodestyleCategorySeverity.E
python.linting.pycodestyleCategorySeverity.W
but there doesn’t seem to be anything similar forpydocstyle
.
According to the docs,
The Python extension maps all pydocstyle errors to the Convention © category.
My setting for python.linting.pylintCategorySeverity.convention
is set to the default which is ‘Information’.
Actual behaviour
My pydocstyle
violations are all listed as ‘Warnings’ (yellow underlines).
Steps to reproduce:
Any and all pydocstyle violations, e.g. define a function without a docstring.
Logs
Output for Python
in the Output
panel
> ~/redactedCondaEnvPath/python ~/.vscode/extensions/ms-python.python-2021.5.842923320/pythonFiles/pyvsc-run-isolated.py mypy --ignore-missing-imports --follow-imports=silent --show-column-numbers --no-implicit-optional ~/redactedWorkspacePath/redactedScriptPath.py
cwd: ~/redactedWorkspacePath
> ~/redactedCondaEnvPath/python ~/.vscode/extensions/ms-python.python-2021.5.842923320/pythonFiles/pyvsc-run-isolated.py mypy --ignore-missing-imports --follow-imports=silent --show-column-numbers --no-implicit-optional ~/redactedWorkspacePath/redactedScriptPath.py
cwd: ~/redactedWorkspacePath
> ~/redactedCondaEnvPath/python ~/.vscode/extensions/ms-python.python-2021.5.842923320/pythonFiles/pyvsc-run-isolated.py pycodestyle --ignore=W191,E501,E261,E128,E302 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/redactedWorkspacePath/redactedScriptPath.py
cwd: ~/redactedWorkspacePath
> ~/redactedCondaEnvPath/python ~/.vscode/extensions/ms-python.python-2021.5.842923320/pythonFiles/pyvsc-run-isolated.py pycodestyle --ignore=W191,E501,E261,E128,E302 --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/redactedWorkspacePath/redactedScriptPath.py
cwd: ~/redactedWorkspacePath
> ~/redactedCondaEnvPath/python ~/.vscode/extensions/ms-python.python-2021.5.842923320/pythonFiles/pyvsc-run-isolated.py pydocstyle --ignore=D205,D212,D413,D407,D406,D203,D204,D100 ~/redactedWorkspacePath/redactedScriptPath.py
cwd: ~/redactedWorkspacePath
> ~/redactedCondaEnvPath/python ~/.vscode/extensions/ms-python.python-2021.5.842923320/pythonFiles/pyvsc-run-isolated.py pydocstyle --ignore=D205,D212,D413,D407,D406,D203,D204,D100 ~/redactedWorkspacePath/redactedScriptPath.py
cwd: ~/redactedWorkspacePath
##########Linting Output - pycodestyle##########
99,1,E,E265:block comment should start with '# '
##########Linting Output - pydocstyle##########
/home/user/redactedWorkspacePath/redactedScriptPath.py:49 in public function `parse_args`:
D103: Missing docstring in public function
/home/user/redactedWorkspacePath/redactedScriptPath.py:78 in public function `get_system_info`:
D103: Missing docstring in public function
/home/user/redactedWorkspacePath/redactedScriptPath.py:86 in public function `get_gpu_info`:
D103: Missing docstring in public function
/home/user/redactedWorkspacePath/redactedScriptPath.py:100 in public function `get_git_rev`:
D103: Missing docstring in public function
/home/user/redactedWorkspacePath/redactedScriptPath.py:112 in public function `get_checkpoint`:
D103: Missing docstring in public function
/home/user/redactedWorkspacePath/redactedScriptPath.py:124 in public function `setup_logger`:
D103: Missing docstring in public function
/home/user/redactedWorkspacePath/redactedScriptPath.py:143 in public function `setup_callbacks`:
D103: Missing docstring in public function
/home/user/redactedWorkspacePath/redactedScriptPath.py:161 in public function `flow_viz`:
D103: Missing docstring in public function
##########Linting Output - mypy##########
Success: no issues found in 1 source file
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Error Codes — pydocstyle 6.1.1 documentation
Not all error codes are checked for by default. There are three conventions that may be used by pydocstyle: pep257 , numpy and...
Read more >workspace configuration options not working with pyls · Issue #590 ...
I'm trying to configure pyls to use the pydocstyle plugin (which is disabled ... (pydocstyle (enabled . t))) is correct, and probably the...
Read more >Settings Reference for Python - Visual Studio Code
Accepted values are true or false . diagnosticSeverityOverrides, {}, Allows a user to override the severity levels for individual diagnostics.
Read more >2034385 – Spyder 5 code style and docstring underlining ...
Description of problem: Code underlining for docstring and code style warnings do ... I think the needed packages are: python3-pydocstyle python3-autopep8 ...
Read more >why are pylint's error squiggle lines not showing in python ...
W Severity of Flake8 message type 'W'. Warning python.linting.flake8Enabled Whether to lint Python files using flake8 false python.linting.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jacquelinevalenti feel free to! 😊
@jacquelinevalenti because it’s been a month, I’m removing you as an assignee so others can work on this if they want. If you would still like to send a PR for this issue let me know and I can add you back 😊