Skip to content

Commit a4ffe80

Browse files
committed
Typing fixes
1 parent 59c62c6 commit a4ffe80

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

jwt_rsa/token.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
DAY = 86400
2020
DEFAULT_EXPIRATION = timedelta(days=31).total_seconds()
2121
NBF_DELTA = 20
22-
ALGORITHMS: tuple[str, ...] = ("RS256", "RS384", "RS512")
22+
ALGORITHMS: Sequence[AlgorithmType] = ("RS256", "RS384", "RS512")
2323

2424

2525
def date_to_timestamp(
@@ -46,7 +46,7 @@ class JWTDecoder:
4646
expires: int | float
4747
nbf_delta: int | float
4848
algorithm: AlgorithmType
49-
algorithms: Sequence[str]
49+
algorithms: Sequence[AlgorithmType]
5050

5151
def __init__(
5252
self,
@@ -55,7 +55,7 @@ def __init__(
5555
expires: int | float = DEFAULT_EXPIRATION,
5656
nbf_delta: int | float = NBF_DELTA,
5757
algorithm: AlgorithmType = "RS512",
58-
algorithms: Sequence[str] = ALGORITHMS,
58+
algorithms: Sequence[AlgorithmType] = ALGORITHMS,
5959
):
6060
super().__setattr__("public_key", key)
6161
super().__setattr__("jwt", PyJWT(options))
@@ -98,7 +98,7 @@ def JWT(
9898
expires: int | float = DEFAULT_EXPIRATION,
9999
nbf_delta: int | float = NBF_DELTA,
100100
algorithm: AlgorithmType = "RS512",
101-
algorithms: Sequence[str] = ALGORITHMS,
101+
algorithms: Sequence[AlgorithmType] = ALGORITHMS,
102102
) -> JWTSigner: ...
103103

104104

@@ -109,7 +109,7 @@ def JWT(
109109
expires: int | float = DEFAULT_EXPIRATION,
110110
nbf_delta: int | float = NBF_DELTA,
111111
algorithm: AlgorithmType = "RS512",
112-
algorithms: Sequence[str] = ALGORITHMS,
112+
algorithms: Sequence[AlgorithmType] = ALGORITHMS,
113113
) -> JWTDecoder: ...
114114

115115

@@ -120,7 +120,7 @@ def JWT(
120120
expires: int | float = DEFAULT_EXPIRATION,
121121
nbf_delta: int | float = NBF_DELTA,
122122
algorithm: AlgorithmType = "RS512",
123-
algorithms: Sequence[str] = ALGORITHMS,
123+
algorithms: Sequence[AlgorithmType] = ALGORITHMS,
124124
) -> JWTSigner | JWTDecoder:
125125
kwargs: dict[str, Any] = dict(
126126
expires=expires,

0 commit comments

Comments
 (0)