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

method_overridden() incorrect signature #190

Open
peterschutt opened this issue Feb 13, 2022 · 0 comments
Open

method_overridden() incorrect signature #190

peterschutt opened this issue Feb 13, 2022 · 0 comments

Comments

@peterschutt
Copy link

In method_overridden(), the instance arg is typed as Model:

def method_overridden(method_name: str, klass: type, instance: Model) -> bool: ...

However, the only time the func is called in drf source is in RelatedField.__init__() checking that get_queryset() is overridden:

if not method_overridden('get_queryset', RelatedField, self):

Perhaps instance should just be typed Any?

I'll be happy to PR when I get some time.

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

No branches or pull requests

1 participant