mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-10 22:11:54 +08:00
wip
This commit is contained in:
6
mypy_django_plugin/lib/generics.py
Normal file
6
mypy_django_plugin/lib/generics.py
Normal file
@@ -0,0 +1,6 @@
|
||||
def make_classes_generic(*klasses: type) -> None:
|
||||
for klass in klasses:
|
||||
def fake_classgetitem(cls, *args, **kwargs):
|
||||
return cls
|
||||
|
||||
klass.__class_getitem__ = classmethod(fake_classgetitem) # type: ignore
|
||||
Reference in New Issue
Block a user