- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated typing of expires_delta and fresh (#510)
* Update typing.py cleaned up ExpiresDelta type definition and added Fresh type * Update utils.py updated typing for `expires_delta` and `fresh` * Update jwt_manager.py updated typing of `fresh` * Update tokens.py updated typing for `fresh` * Update tokens.py added missing import * Update typing.py float type is required while building the token_data dict in _encode_jwt
Showing
4 changed files
with
12 additions
and
8 deletions.
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
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
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,10 +1,11 @@ | ||
import sys | ||
from typing import Any | ||
from datetime import timedelta | ||
from typing import Union | ||
|
||
if sys.version_info >= (3, 8): | ||
from typing import Literal # pragma: no cover | ||
else: | ||
from typing_extensions import Literal # pragma: no cover | ||
|
||
ExpiresDelta = Union[Literal[False], Any] | ||
ExpiresDelta = Union[Literal[False], timedelta] | ||
Fresh = Union[bool, float, timedelta] |
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