You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! First of all, thank you very much for the extension!
As the title suggests, the typing.Callable is incomplete as an annotation. While mypy never complains, not even in --strict mode, pylance will, since the complete statement (a very generic one) would be typing.Callable[..., typing.Any].
After updating the reference, I tried to compile the stubs myself, but there are a couple of problems, probably due to the exact Python, PySide, and mypy versions. For example, every Classvar and Any miss the typing prefix, and Union[T, None] has changed to Optional[T].
Not to mention that the biggest problem is the function in mypy/stubdoc.py:is_valid_type. This function will complain about typing.Callable[..., Any] as not being a valid type, which makes sense, so I've modified its regex pattern to make it work. But of course, this would only work in my environment.
I have a repo that generates Nuke python stubs, and I managed to fix some irresolvable problems by running some post-fixes after the stubs generation. While not the cleanest solution, it allows for a certain level of "manual" modifications.
So I did fork your project, made the modifications, and passed the tests. You can look into whether you are interested in implementing this in one way or another or accepting a PR.
Thanks again for this extension.
The text was updated successfully, but these errors were encountered:
Hi @sisoe24, thanks for the detailed report. I moved this project into my https://github.com/LumaPictures/cg-stubs projects. Sorry, I should update the README here to redirect there. I will do that ASAP.
It would be great if you could make a PR against that project. You'll see that the other project also has stubs for Nuke, so it would fantastic to team up on those.
No problem at all, and it would be very cool to improve the Nuke stubs together.
I am trying to get the repo up and running, but I have gotten this error: ./stubgen_nuke.sh: line 7: setpkg: command not found. I see that it is a package of yours, but before I go down a rabbit hole maybe I need more context. Should we continue the conversation on the cg-stubs repo?
Hi! First of all, thank you very much for the extension!
As the title suggests, the
typing.Callable
is incomplete as an annotation. Whilemypy
never complains, not even in--strict
mode,pylance
will, since the complete statement (a very generic one) would betyping.Callable[..., typing.Any]
.After updating the reference, I tried to compile the stubs myself, but there are a couple of problems, probably due to the exact Python, PySide, and mypy versions. For example, every
Classvar
andAny
miss thetyping
prefix, andUnion[T, None]
has changed toOptional[T]
.Not to mention that the biggest problem is the function in
mypy/stubdoc.py:is_valid_type
. This function will complain abouttyping.Callable[..., Any]
as not being a valid type, which makes sense, so I've modified its regex pattern to make it work. But of course, this would only work in my environment.I have a repo that generates Nuke python stubs, and I managed to fix some irresolvable problems by running some post-fixes after the stubs generation. While not the cleanest solution, it allows for a certain level of "manual" modifications.
So I did fork your project, made the modifications, and passed the tests. You can look into whether you are interested in implementing this in one way or another or accepting a PR.
Thanks again for this extension.
The text was updated successfully, but these errors were encountered: