Skip to content

Commit f104c0f

Browse files
committed
fix errors
1 parent 729f53c commit f104c0f

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

pandas/_typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
NumpySorter = Optional[npt._ArrayLikeInt_co] # type: ignore[name-defined]
8585

8686
if sys.version_info >= (3, 10):
87-
from typing import TypeGuard as TypeGuard
87+
from typing import TypeGuard
8888
else:
8989
from typing_extensions import TypeGuard # pyright: ignore[reportUnusedImport]
9090

pandas/core/dtypes/dtypes.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -951,10 +951,7 @@ class PeriodDtype(PeriodDtypeBase, PandasExtensionDtype):
951951
# "Dict[int, PandasExtensionDtype]", base class "PandasExtensionDtype"
952952
# defined the type as "Dict[str, PandasExtensionDtype]") [assignment]
953953
_cache_dtypes: dict[BaseOffset, PeriodDtype] = {} # type: ignore[assignment] # noqa: E501
954-
# error: Incompatible types in assignment (expression has type "Callable[[
955-
# PeriodDtypeBase], int]", base class "PandasExtensionDtype" defined the type
956-
# as "Callable[[PandasExtensionDtype], int]")
957-
__hash__ = PeriodDtypeBase.__hash__ # type: ignore[assignment]
954+
__hash__ = PeriodDtypeBase.__hash__
958955
_freq: BaseOffset
959956

960957
def __new__(cls, freq):

pandas/core/dtypes/missing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
from decimal import Decimal
77
from functools import partial
8-
from re import Pattern
98
from typing import (
109
TYPE_CHECKING,
1110
overload,
@@ -47,6 +46,8 @@
4746
from pandas.core.dtypes.inference import is_list_like
4847

4948
if TYPE_CHECKING:
49+
from re import Pattern
50+
5051
from pandas._typing import (
5152
ArrayLike,
5253
DtypeObj,

0 commit comments

Comments
 (0)