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

Fine grained mode should respect __getattr__ #4936

Open
ilevkivskyi opened this issue Apr 19, 2018 · 0 comments
Open

Fine grained mode should respect __getattr__ #4936

ilevkivskyi opened this issue Apr 19, 2018 · 0 comments

Comments

@ilevkivskyi
Copy link
Member

Currently this fine grained test fails:

[case testGetAttrFine]
from a import A
x: A
y: int = x.x
[file a.py]
class A:
    def __getattr__(self, attr: str) -> int:
        pass
[file a.py.2]
class A:
    def __getattr__(self, attr: str) -> str:
        pass
[out]
==
main:3: error: Incompatible types in assignment (expression has type "str", variable has type "int")

We need to trigger wildcard trigger on class or module if its __getattr__ is triggered. Also we need to be sure that this (chaining wildcard and normal deps <Base.__getattr__> -> <Base[wildcard]> and <Base.x> -> <Sub.x> etc.) works correctly on subclasses.

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

No branches or pull requests

1 participant