-
Notifications
You must be signed in to change notification settings - Fork 36
Pylint error E1206 not detected &highlighted in vscode. #770
Description
Diagnostic Data
- Python version (& distribution if applicable, e.g., Anaconda): Python 3.12.0 (Anaconda)
- Type of virtual environment used (e.g., conda, venv, virtualenv, etc.): conda
- Operating system (and version): Ubuntu 24.04 LTS
- Version of tool extension you are using: ms-python.python 2024.14.0
- Pylint 4.0.4
Behaviour
Expected Behavior
E1206 (logging-too-few-args) pylint errors should be displayed in the VSCode editor, just like other pylint error types.
Actual Behavior
E1206 errors are detected when running pylint from the terminal, but are not displayed in the VSCode editor.
Reproduction Steps:
-
Create a Python file with a logging format string error:
""" main """ import logging def main(): logger = logging.getLogger(__name__) logger.info("Missing=%s") # correct code : logger.info("Missing=%s", 123) if __name__ == "__main__": main()
-
Configure VSCode to use pylint with:
{ "pylint.args": ["--rcfile=config/.pylintrc"] }This file can be empty.
-
Open the file in VSCode
-
Observe that the E1206 error is NOT shown in the editor
-
Run
python -m pylint file.pyfrom terminal and confirm E1206 IS detected
Logs:
Click here for detailed logs
From VSCode Python extension logs, the exact command run is:
python -m pylint --reports=n --output-format=json --rcfile=config/.pylintrc --clear-cache-post-run=y --from-stdin file.py
When this identical command is run from terminal, it produces JSON output that includes the E1206 error:
{
"type": "error",
"module": "test_file",
"obj": "test_function",
"line": 5,
"column": 4,
"path": "file.py",
"symbol": "logging-too-few-args",
"message": "Not enough arguments for logging format string",
"message-id": "E1206"
}However, this error does NOT appear in VSCode's published diagnostics, while other pylint error types do appear.
Outcome When Attempting Debugging Steps:
Did running it from the command line work? YES - Running the exact same pylint command from terminal correctly detects and reports the E1206 error.
The command python -m pylint --reports=n --output-format=json --rcfile=config/.pylintrc --from-stdin file.py works perfectly from terminal and includes E1206 in the JSON output.