We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 929962d commit 29a6af7Copy full SHA for 29a6af7
1 file changed
src/phantom/interval.py
@@ -164,12 +164,14 @@ def parse(cls: type[Derived], instance: object) -> Derived:
164
)
165
166
@classmethod
167
- def _schema_bound(cls, value: float, infinity: float) -> int | float | None:
+ def _schema_bound(
168
+ cls, value: FloatComparable[Any], infinity: float
169
+ ) -> int | float | None:
170
"""Convert interval bound to schema-appropriate numeric type."""
171
if value == infinity:
172
return None
173
if isinstance(cls.__bound__, type) and issubclass(cls.__bound__, int):
- return int(value)
174
+ return int(value) # type: ignore[call-overload, no-any-return]
175
return float(value)
176
177
0 commit comments