Open microbit-carlos opened 2 years ago
This is an interesting case. I think for the moment it makes sense to see how prevalent this kind of scenario is as we see more folk writing non-trivial code in the editor. There will be consequences to relaxing these checks that might miss many error scenarios.
In this case ideally the inference would be Option[float], I might look at why it isn't if I get a chance as Pyright generally does good flow analysis.
Bug Description
Seems like Pyright is doing type inferring, and then reporting errors based on that. This is probably a "good thing™️", but can result in the editor reporting errors that might be fine during runtime
How To Reproduce
Expected behavior
Not sure if we would want to filter this kind of error, or if there would be a way to filter some of these.
Screenshots
In "How To Reproduce" section.
Environment
N/A
Additional context
N/A