- Notifications
You must be signed in to change notification settings - Fork26.3k
[JIT] resolve ignored module method type annotations#26683
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| py::bool_ isMethod =py::module::import("inspect").attr("ismethod")(obj); | ||
| // methods here have been explicitly annotated to not be compiled, | ||
| // so they do not have the same overload and compile checks as for functions | ||
| if (isFunction || isMethod) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
You can also doif (PyCallable_Check(obj.ptr())) and avoid the extrainspect call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Wouldn't that give a false positive for something that has a__call__ function ?
facebook-github-bot left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@eellison has imported this pull request. If you are a Facebook employee, you can view this diffon Phabricator.
Previously we weren't passing an rcb around, causing NamedTuples with@unused methods to fail.