sweatstack 0.58.0__py3-none-any.whl → 0.59.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sweatstack/schemas.py +46 -1
- {sweatstack-0.58.0.dist-info → sweatstack-0.59.0.dist-info}/METADATA +1 -1
- {sweatstack-0.58.0.dist-info → sweatstack-0.59.0.dist-info}/RECORD +5 -5
- {sweatstack-0.58.0.dist-info → sweatstack-0.59.0.dist-info}/WHEEL +0 -0
- {sweatstack-0.58.0.dist-info → sweatstack-0.59.0.dist-info}/entry_points.txt +0 -0
sweatstack/schemas.py
CHANGED
|
@@ -122,6 +122,22 @@ Sport.is_sub_sport_of.__doc__ = _is_sub_sport_of.__doc__
|
|
|
122
122
|
Sport.is_root_sport = _is_root_sport
|
|
123
123
|
Sport.is_root_sport.__doc__ = _is_root_sport.__doc__
|
|
124
124
|
|
|
125
|
+
@classmethod
|
|
126
|
+
def _sport_missing(cls, value: str):
|
|
127
|
+
"""Handle unknown sport values from newer API versions.
|
|
128
|
+
|
|
129
|
+
This allows the client to gracefully handle new sports added to the API
|
|
130
|
+
without requiring a client library update. Unknown values become dynamic
|
|
131
|
+
enum members that behave like regular Sport values.
|
|
132
|
+
"""
|
|
133
|
+
pseudo_member = object.__new__(cls)
|
|
134
|
+
pseudo_member._name_ = value
|
|
135
|
+
pseudo_member._value_ = value
|
|
136
|
+
cls._value2member_map_[value] = pseudo_member # Cache for future lookups
|
|
137
|
+
return pseudo_member
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
Sport._missing_ = _sport_missing
|
|
125
141
|
Sport.display_name = _display_name
|
|
126
142
|
Sport.display_name.__doc__ = _display_name.__doc__
|
|
127
143
|
|
|
@@ -134,5 +150,34 @@ def _metric_display_name(metric: Metric) -> str:
|
|
|
134
150
|
return metric.value.replace("_", " ")
|
|
135
151
|
|
|
136
152
|
|
|
153
|
+
@classmethod
|
|
154
|
+
def _metric_missing(cls, value: str):
|
|
155
|
+
"""Handle unknown metric values from newer API versions.
|
|
156
|
+
|
|
157
|
+
This allows the client to gracefully handle new metrics added to the API
|
|
158
|
+
without requiring a client library update. Unknown values become dynamic
|
|
159
|
+
enum members that behave like regular Metric values.
|
|
160
|
+
"""
|
|
161
|
+
pseudo_member = object.__new__(cls)
|
|
162
|
+
pseudo_member._name_ = value
|
|
163
|
+
pseudo_member._value_ = value
|
|
164
|
+
cls._value2member_map_[value] = pseudo_member # Cache for future lookups
|
|
165
|
+
return pseudo_member
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
Metric._missing_ = _metric_missing
|
|
137
169
|
Metric.display_name = _metric_display_name
|
|
138
|
-
Metric.display_name.__doc__ = _metric_display_name.__doc__
|
|
170
|
+
Metric.display_name.__doc__ = _metric_display_name.__doc__
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
@classmethod
|
|
174
|
+
def _scope_missing(cls, value: str):
|
|
175
|
+
"""Handle unknown scope values from newer API versions."""
|
|
176
|
+
pseudo_member = object.__new__(cls)
|
|
177
|
+
pseudo_member._name_ = value
|
|
178
|
+
pseudo_member._value_ = value
|
|
179
|
+
cls._value2member_map_[value] = pseudo_member
|
|
180
|
+
return pseudo_member
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
Scope._missing_ = _scope_missing
|
|
@@ -6,12 +6,12 @@ sweatstack/ipython_init.py,sha256=OtBB9dQvyLXklD4kA2x1swaVtU9u73fG4V4-zz4YRAg,13
|
|
|
6
6
|
sweatstack/jupyterlab_oauth2_startup.py,sha256=YcjXvzeZ459vL_dCkFi1IxX_RNAu80ZX9rwa0OXJfTM,1023
|
|
7
7
|
sweatstack/openapi_schemas.py,sha256=iXxhnEVErlgapNnXWbb0bJRWwiGBUMXO7sdovL5q8U8,49475
|
|
8
8
|
sweatstack/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
sweatstack/schemas.py,sha256=
|
|
9
|
+
sweatstack/schemas.py,sha256=GISBS4XFFV7yOj8kPlzMWRaMBEYjkJTui7Zqppb02uY,5965
|
|
10
10
|
sweatstack/streamlit.py,sha256=wnabWhife9eMAdkECPjRKkzE82KZoi_H8YzucZl_m9s,19604
|
|
11
11
|
sweatstack/sweatshell.py,sha256=MYLNcWbOdceqKJ3S0Pe8dwHXEeYsGJNjQoYUXpMTftA,333
|
|
12
12
|
sweatstack/utils.py,sha256=AwHRdC1ziOZ5o9RBIB21Uxm-DoClVRAJSVvgsmSmvps,1801
|
|
13
13
|
sweatstack/Sweat Stack examples/Getting started.ipynb,sha256=k2hiSffWecoQ0VxjdpDcgFzBXDQiYEebhnAYlu8cgX8,6335204
|
|
14
|
-
sweatstack-0.
|
|
15
|
-
sweatstack-0.
|
|
16
|
-
sweatstack-0.
|
|
17
|
-
sweatstack-0.
|
|
14
|
+
sweatstack-0.59.0.dist-info/METADATA,sha256=811kowZZQ5K40LdVRA5JeLk95TBj5MHY6UGWn91g4Kg,852
|
|
15
|
+
sweatstack-0.59.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
16
|
+
sweatstack-0.59.0.dist-info/entry_points.txt,sha256=kCzOUQI3dqbTpEYqtgYDeiKFaqaA7BMlV6D24BMzCFU,208
|
|
17
|
+
sweatstack-0.59.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|