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

get_dynamic_class_hook() doesn't work for inlined callls #7556

Open
ilevkivskyi opened this issue Sep 24, 2019 · 0 comments
Open

get_dynamic_class_hook() doesn't work for inlined callls #7556

ilevkivskyi opened this issue Sep 24, 2019 · 0 comments
Labels
bug mypy got something wrong priority-1-normal topic-plugins The plugin API and ideas for new plugins

Comments

@ilevkivskyi
Copy link
Member

ilevkivskyi commented Sep 24, 2019

This is currently supported using get_dynamic_class_hook():

Base = some.custom_class('Base', ...)

class Model(Base):
    ...

But it doesn't work if the call is inlined, which can often be annoying:

class Model(some.custom_class('Base', ...)):  # the hook is not called here
    ...

We can support the second use case by calling the same hook with the l.h.s. name set to None.

@ilevkivskyi ilevkivskyi added bug mypy got something wrong priority-1-normal topic-plugins The plugin API and ideas for new plugins labels Sep 24, 2019
@ilevkivskyi ilevkivskyi self-assigned this Sep 24, 2019
@ilevkivskyi ilevkivskyi removed their assignment Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong priority-1-normal topic-plugins The plugin API and ideas for new plugins
Projects
None yet
Development

No branches or pull requests

1 participant