-
Notifications
You must be signed in to change notification settings - Fork 53
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
Replacement for --no-setup-py in version 1.x #116
Comments
The |
The |
that was related to 0.16.2, which is why I deleted the comment. In 1.0 and 1.1 I get errors about stubgen being unable to find / import modules that 0.16.2 would only throw at me if I didn't have '--no-setup-py' in the call. Mainly errors like this: (running pybind11-stubgen -o /tmp/build/pypi.tmp/stubs mymod.PyUI._PyUIManager) pybind11_stubgen - [ ERROR] In mymod.PyUI._PyUIManager : Can't find/import 'Gf.Vec3d' pybind11_stubgen - [ ERROR] In mymod.PyUI._PyUIManager : Can't find/import 'Gf.Vec2d' pybind11_stubgen - [ ERROR] In mymod.PyUI._PyUIManager : Can't find/import 'Sdf.Path' pybind11_stubgen - [ ERROR] In mymod.PyUI._PyUIManager : Can't find/import 'function' pybind11_stubgen - [ ERROR] In mymod.PyUI._PyUIManager : Can't find/import 'Usd.Stage' pybind11_stubgen - [ ERROR] In mymod.PyUI._PyUIManager : Can't find/import 'Gf.Vec2i' The Gf and Usd types are provided by external modules installed in the same venv and referenced by the binary module I'm trying to generate stubs for. |
Now |
I think we can close this as the option I'm asking about is definitely NOT what caused the errors. Adding the The one thing I'm not entirely sure why stubgen complains about is 'function', because that really is not a module used by anything in our codebase but I'm fine just ignoring it as "who knows?". [EDIT: missing an important NOT] |
The def foo(): ...
def my_func(callback: type(foo)): ... # <-- type of `calllback` arg is "function" This should be fixed in #119 Names are harvested from signatures (possibly restored from docstring) and actual values (e.g. module attributes). You could see all the names in output |
I'm going to close this one. If you find new "auto-import" feature don't do what you expect to, please open a new one. |
As the release notes for 1.0 state "some command line options have been removed" - that's all nice and well but is there any equivalent to
--no-setup-py
from 0.16 or are there any plans to provide it?My company is using stubgen in one of our projects and rely on the ability to run with that flag so currently need to pin to ~= 0.16.
The text was updated successfully, but these errors were encountered: