-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem type checking ancestors()
with pyright
#1242
Comments
We can replace the signature with Mypy treat it as |
ancestors()
ancestors()
with pyright
What might work well across type checkers is relying on type vars defaults in the typing extensions backport of |
I think that is the best solution, although I am not going to backport a fix depending on typing_extension. So maybe for 0.16.x. |
Information
What is the current behavior?
Pyright is unable to fully type check the
rustworkx.ancestors()
function in strict mode.What is the expected behavior?
Pyright should be able to determine the type of
ancestors()
, including the parameterized type of thegraph
parameter.Steps to reproduce the problem
I looked at the stub file
rustworkx/rustworkx/rustworkx.pyi
Lines 985 to 990 in 553bff1
and
graph
doesn't havePyDiGraph[_S, _T]
like in some of the other functions. I also ran into this issue with thedescendants()
function.The text was updated successfully, but these errors were encountered: