mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-15 00:07:09 +08:00
Attempt to fix 'INTERNAL ERROR using annotate'. (#753)
KeyError: "Failed qualified lookup: '_AnyAttrAllowed' (fullname = 'django._AnyAttrAllowed')." https://github.com/typeddjango/django-stubs/issues/745
This commit is contained in:
@@ -2,5 +2,6 @@ from .aliases import ValuesQuerySet as ValuesQuerySet
|
||||
from .annotations import Annotations as Annotations
|
||||
from .annotations import WithAnnotations as WithAnnotations
|
||||
from .patch import monkeypatch as monkeypatch
|
||||
from .types import AnyAttrAllowed as AnyAttrAllowed
|
||||
|
||||
__all__ = ["monkeypatch", "ValuesQuerySet", "WithAnnotations", "Annotations"]
|
||||
__all__ = ["monkeypatch", "ValuesQuerySet", "WithAnnotations", "Annotations", "AnyAttrAllowed"]
|
||||
|
||||
10
django_stubs_ext/django_stubs_ext/types.py
Normal file
10
django_stubs_ext/django_stubs_ext/types.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from typing import Any, Protocol
|
||||
|
||||
|
||||
# Used internally by mypy_django_plugin.
|
||||
class AnyAttrAllowed(Protocol):
|
||||
def __getattr__(self, item: str) -> Any:
|
||||
...
|
||||
|
||||
def __setattr__(self, item: str, value: Any) -> None:
|
||||
...
|
||||
Reference in New Issue
Block a user