Skip to content

Commit 34cbf72

Browse files
committed
manual ruff check fixes
1 parent a238c47 commit 34cbf72

File tree

3 files changed

+20
-27
lines changed

3 files changed

+20
-27
lines changed

openfeature/evaluation_context/__init__.py

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

3-
import typing
43
from collections.abc import Mapping, Sequence
54
from dataclasses import dataclass, field
65
from datetime import datetime
@@ -10,15 +9,13 @@
109
__all__ = ["EvaluationContext", "get_evaluation_context", "set_evaluation_context"]
1110

1211
# https://openfeature.dev/specification/sections/evaluation-context#requirement-312
13-
EvaluationContextAttribute = typing.Union[
14-
bool,
15-
int,
16-
float,
17-
str,
18-
datetime,
19-
Sequence["EvaluationContextAttribute"],
20-
Mapping[str, "EvaluationContextAttribute"],
21-
]
12+
EvaluationContextAttribute = bool \
13+
| int \
14+
| float \
15+
| str \
16+
| datetime \
17+
| Sequence["EvaluationContextAttribute"] \
18+
| Mapping[str, "EvaluationContextAttribute"]
2219

2320

2421
@dataclass

openfeature/flag_evaluation.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,12 @@ class Reason(StrEnum):
4343

4444

4545
FlagMetadata = Mapping[str, bool | int | float | str]
46-
FlagValueType = typing.Union[
47-
bool,
48-
int,
49-
float,
50-
str,
51-
Sequence["FlagValueType"],
52-
Mapping[str, "FlagValueType"],
53-
]
46+
FlagValueType = bool \
47+
| int \
48+
| float \
49+
| str \
50+
| Sequence["FlagValueType"] \
51+
| Mapping[str, "FlagValueType"]
5452

5553
T_co = typing.TypeVar("T_co", covariant=True)
5654

openfeature/hook/__init__.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,13 @@ def __setattr__(self, key: str, value: typing.Any) -> None:
6969

7070

7171
# https://openfeature.dev/specification/sections/hooks/#requirement-421
72-
HookHintValue = typing.Union[
73-
bool,
74-
int,
75-
float,
76-
str,
77-
datetime,
78-
Sequence["HookHintValue"],
79-
Mapping[str, "HookHintValue"],
80-
]
72+
HookHintValue = bool \
73+
| int \
74+
| float \
75+
| str \
76+
| datetime \
77+
| Sequence["HookHintValue"] \
78+
| Mapping[str, "HookHintValue"]
8179

8280
HookHints = Mapping[str, HookHintValue]
8381

0 commit comments

Comments
 (0)