You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to mypy 0.990 (from 0.982), the following code example causes a Metaclass conflict
from rest_framework.permissions import BasePermission
class OrgPermissions(BasePermission):
...
How it should be
Running mypy on the above class should not cause
error: Metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases [misc]
I'm also willing to accept this is an improper use of Metaclasses by drf directly but I've never seen this error in running code so I figured I would start with a bug here.
System information
OS: Linux
python version: 3.9.x
django version: 4.0.x
mypy version: 0.990
django-stubs version: 1.12.x
The text was updated successfully, but these errors were encountered:
mattwwarren
changed the title
rest_framework.permissions.BasePermission
rest_framework.permissions.BasePermission causes a Metaclass conflict error
Nov 10, 2022
Bug report
What's wrong
After upgrading to mypy 0.990 (from 0.982), the following code example causes a Metaclass conflict
How it should be
Running mypy on the above class should not cause
I'm also willing to accept this is an improper use of Metaclasses by drf directly but I've never seen this error in running code so I figured I would start with a bug here.
System information
python
version: 3.9.xdjango
version: 4.0.xmypy
version: 0.990django-stubs
version: 1.12.xThe text was updated successfully, but these errors were encountered: