Skip to content

Commit 5435a9b

Browse files
committed
Explicit TypeAlias
Signed-off-by: Matthew Keeler <[email protected]>
1 parent ba5138c commit 5435a9b

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

openfeature/evaluation_context/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import typing
34
from collections.abc import Mapping, Sequence
45
from dataclasses import dataclass, field
56
from datetime import datetime
@@ -9,7 +10,7 @@
910
__all__ = ["EvaluationContext", "get_evaluation_context", "set_evaluation_context"]
1011

1112
# https://openfeature.dev/specification/sections/evaluation-context#requirement-312
12-
EvaluationContextAttribute = (
13+
EvaluationContextAttribute: typing.TypeAlias = (
1314
bool
1415
| int
1516
| float

openfeature/flag_evaluation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Reason(StrEnum):
4343

4444

4545
FlagMetadata = Mapping[str, bool | int | float | str]
46-
FlagValueType = (
46+
FlagValueType: typing.TypeAlias = (
4747
bool
4848
| int
4949
| float

openfeature/hook/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def __setattr__(self, key: str, value: typing.Any) -> None:
6969

7070

7171
# https://openfeature.dev/specification/sections/hooks/#requirement-421
72-
HookHintValue = (
72+
HookHintValue: typing.TypeAlias = (
7373
bool
7474
| int
7575
| float

0 commit comments

Comments
 (0)