Skip to content

Commit 2baef30

Browse files
committed
CLN: Union[int, float] -> float
1 parent 3260010 commit 2baef30

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/io/stata.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ class StataMissingValue:
765765
"float64": struct.unpack("<d", float64_base)[0],
766766
}
767767

768-
def __init__(self, value: Union[int, float]):
768+
def __init__(self, value: float):
769769
self._value = value
770770
# Conversion to int to avoid hash issues on 32 bit platforms #8968
771771
value = int(value) if value < 2147483648 else float(value)
@@ -784,7 +784,7 @@ def string(self) -> str:
784784
return self._str
785785

786786
@property
787-
def value(self) -> Union[int, float]:
787+
def value(self) -> float:
788788
"""
789789
The binary representation of the missing value.
790790
@@ -809,7 +809,7 @@ def __eq__(self, other: Any) -> bool:
809809
)
810810

811811
@classmethod
812-
def get_base_missing_value(cls, dtype: np.dtype) -> Union[int, float]:
812+
def get_base_missing_value(cls, dtype: np.dtype) -> float:
813813
if dtype == np.int8:
814814
value = cls.BASE_MISSING_VALUES["int8"]
815815
elif dtype == np.int16:

0 commit comments

Comments
 (0)