I was building a simulator for planets' orbits, and pyright is really helpful for highlighting mistakes automatically, but for some reason it doesn't understand perfectly working operations with astropy's units and keeps highlighting it as if they were incorrect.
How can I make pyright ignore these operations? It probably involves editing pyrightconfig.json according to the
Also, I don't know if that is a bug and I should report it, and if so, how do I do that?
Minimal code needed to reproduce:
from astropy import units
var = 3 * units.m
CodePudding user response:
If you want to ignore this warning, you can do the following steps:
Use "Ctrl Shift P" and search "Preferences: Open User Settings(JSON)"
Then add the following codes to settings.json
:
"python.analysis.diagnosticSeverityOverrides": {
"reportGeneralTypeIssues": "none"
},