-
-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add StrPromise and StrOrPromise aliases to django_stubs_ext.
We make StrPromise and StrOrPromise available via django_stubs_ext so that conditional imports with TYPE_CHECKING is not required. These aliases fall back to Promise or Union[str, Promise] when not TYPE_CHECKING. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
- Loading branch information
Showing
2 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
from .aliases import StrOrPromise, StrPromise | ||
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", "AnyAttrAllowed"] | ||
__all__ = [ | ||
"monkeypatch", | ||
"ValuesQuerySet", | ||
"WithAnnotations", | ||
"Annotations", | ||
"AnyAttrAllowed", | ||
"StrPromise", | ||
"StrOrPromise", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters