Skip to content
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

Put types in parent modules #6

Open
saulshanabrook opened this issue Jun 16, 2020 · 1 comment
Open

Put types in parent modules #6

saulshanabrook opened this issue Jun 16, 2020 · 1 comment

Comments

@saulshanabrook
Copy link
Contributor

Currently, we list the type where an object is defined as its module. However, many libraries define types in some sub-module but only expose them in a parent module.

So instead, when recording a type, we should look in all parent modules to see if they export this same type. If so, we should use that as the module name instead of where it is created.

@saulshanabrook
Copy link
Contributor Author

Actually we should do this by relying on return type of getattr on modules... If we see a downstream thing getting an attribute of a module, that will be where the class is from!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant