Pyright highlighting perfectly working astropy code as if it were incorrect
Question:
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 link in the image below, but I’m a noob in both json and pyright/pylance, so I didn’t understand what I need to put in that file specifically.
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
Answers:
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 link in the image below, but I’m a noob in both json and pyright/pylance, so I didn’t understand what I need to put in that file specifically.
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