I'm trying to modify my settings.json file for VSCode to ignore missing imports for my own scripts. As i've learnt I have to set "python.analysis.useImportHeuristic" to true. Code says it is an unknown configuration setting but as long as I've searched I haven't seen any info about it. What am I missing?
Ignore Pylance missing imports
Asked Answered
insert this:
# type: ignore
paste it at the top of the file to ignore the file
paste it at the end of a line to ignore the line
Reference: https://www.reddit.com/r/VisualStudioCode/comments/i3mpct/comment/g5bkx9u/
this also ignores the line for mypy which actually does a better job than pylance and will correctly complain about the type ignore because it is useless. is there a pylance specific ignore? –
Mouflon
Add this to your settings.json:
"python.analysis.diagnosticSeverityOverrides": {
"reportMissingImports": "none"
}
© 2022 - 2024 — McMap. All rights reserved.