Environment data
- Language Server version: 2023.3.23
Code Snippet
test.py
settings.json
"python.linting.ignorePatterns": ["test.py"]
Repro Steps
- Create Python file that generates any diagnostics. Example above.
- Ignore that file via
python.linting.ignorePatterns in settings.json. Ensure python.analysis.ignore is not set.
Expected behavior
No diagnostics reported for Python file.
Actual behavior
Diagnostics. Looks like the problem is that python.analysis.ignore defaults to an empty list, so the following assignment does not cause serverSettings.ignoreFileSpecs to be set to the python.linting.ignorePatterns value as expected:
serverSettings.ignoreFileSpecs = tryGetStringValues(
pythonAnalysisSection.ignore ?? pythonSection?.linting?.ignorePatterns
);
Environment data
Code Snippet
test.py
settings.json
Repro Steps
python.linting.ignorePatternsin settings.json. Ensurepython.analysis.ignoreis not set.Expected behavior
No diagnostics reported for Python file.
Actual behavior
Diagnostics. Looks like the problem is that
python.analysis.ignoredefaults to an empty list, so the following assignment does not causeserverSettings.ignoreFileSpecsto be set to thepython.linting.ignorePatternsvalue as expected: