Skip to content

Commit 0c79359

Browse files
authored
fix: typing update for recent change (#157)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 7aacc85 commit 0c79359

File tree

1 file changed

+11
-26
lines changed

1 file changed

+11
-26
lines changed

src/uhi/typing/serialization.py

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@
1010
"DoubleStorage",
1111
"Histogram",
1212
"IntStorage",
13-
"MeanData",
1413
"MeanStorage",
1514
"RegularAxis",
1615
"VariableAxis",
17-
"WeightedData",
18-
"WeightedMeanData",
1916
"WeightedMeanStorage",
2017
"WeightedStorage",
2118
]
@@ -81,45 +78,33 @@ class BooleanAxis(_RequiredBooleanAxis, total=False):
8178

8279
class IntStorage(TypedDict):
8380
type: Literal["int"]
84-
data: str | Sequence[int]
81+
values: Sequence[int] | str
8582

8683

8784
class DoubleStorage(TypedDict):
8885
type: Literal["double"]
89-
data: str | Sequence[float]
90-
91-
92-
class WeightedData(TypedDict):
93-
values: Sequence[float]
94-
variances: Sequence[float]
86+
values: Sequence[float] | str
9587

9688

9789
class WeightedStorage(TypedDict):
9890
type: Literal["weighted"]
99-
data: str | WeightedData
100-
101-
102-
class MeanData(TypedDict):
103-
counts: Sequence[float]
104-
values: Sequence[float]
105-
variances: Sequence[float]
91+
values: Sequence[float] | str
92+
variances: Sequence[float] | str
10693

10794

10895
class MeanStorage(TypedDict):
10996
type: Literal["mean"]
110-
data: str | MeanData
111-
112-
113-
class WeightedMeanData(TypedDict):
114-
sum_of_weights: Sequence[float]
115-
sum_of_weights_squared: Sequence[float]
116-
values: Sequence[float]
117-
variances: Sequence[float]
97+
counts: Sequence[float] | str
98+
values: Sequence[float] | str
99+
variances: Sequence[float] | str
118100

119101

120102
class WeightedMeanStorage(TypedDict):
121103
type: Literal["weighted_mean"]
122-
data: str | WeightedMeanData
104+
sum_of_weights: Sequence[float] | str
105+
sum_of_weights_squared: Sequence[float] | str
106+
values: Sequence[float] | str
107+
variances: Sequence[float] | str
123108

124109

125110
class _RequiredHistogram(TypedDict):

0 commit comments

Comments
 (0)