Replies: 1 comment 1 reply
-
This is a limitation in the way that pyright's code flow engine works. It is technically a bug, but I don't see a way to address it, and I've marked similar bugs as "won't fix" in the past. Here's the problem. The types of some symbols (such as In your example above, the type of ctx: Context = click.get_current_context() I'll continue to think about ways to make this code more robust, but it is an edge case, so I'm reluctant to significantly complicating the code flow engine or slowing down all code analysis to address it. In the meantime, I consider it a known limitation with a straightforward workaround. |
Beta Was this translation helpful? Give feedback.
-
The following produces an error on line 7:
I haven't opened a bug report because I haven't attempted to reproduce it with other third-party modules/packages, so I do not know if it's an issue with click; but it might be worth investigating.
Beta Was this translation helpful? Give feedback.
All reactions