Skip to content

Commit 6bbe77e

Browse files
committed
Import fixes
1 parent 896b29a commit 6bbe77e

File tree

7 files changed

+30
-14
lines changed

7 files changed

+30
-14
lines changed

pandas/core/strings/accessor.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
import numpy as np
1414

1515
import pandas._libs.lib as lib
16-
from pandas._typing import (
17-
DtypeObj
18-
)
16+
from pandas._typing import DtypeObj
1917
from pandas.util._decorators import Appender
2018

2119
from pandas.core.dtypes.common import (
@@ -38,7 +36,11 @@
3836
from pandas.core.base import NoNewAttributesMixin
3937

4038
if TYPE_CHECKING:
41-
from pandas import Index
39+
from pandas import (
40+
DataFrame,
41+
Index,
42+
Series,
43+
)
4244

4345
_shared_docs: dict[str, str] = {}
4446
_cpython_optimized_encoders = (

pandas/core/util/hashing.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
import numpy as np
1616

1717
from pandas._libs.hashing import hash_object_array
18-
from pandas._typing import (
19-
ArrayLike
20-
)
18+
from pandas._typing import ArrayLike
2119

2220
from pandas.core.dtypes.common import (
2321
is_categorical_dtype,
@@ -33,6 +31,7 @@
3331
if TYPE_CHECKING:
3432
from pandas import (
3533
Categorical,
34+
DataFrame,
3635
Index,
3736
MultiIndex,
3837
Series,

pandas/core/window/ewm.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
from pandas.core.dtypes.common import is_datetime64_ns_dtype
2121
from pandas.core.dtypes.missing import isna
2222

23+
from pandas import (
24+
DataFrame,
25+
Series,
26+
)
2327
import pandas.core.common as common # noqa: PDF018
2428
from pandas.core.util.numba_ import maybe_use_numba
2529
from pandas.core.window.common import zsqrt
@@ -760,15 +764,15 @@ def std(self, bias: bool = False, *args, **kwargs):
760764

761765
def corr(
762766
self,
763-
other: FrameOrSeriesUnion | None = None,
767+
other: DataFrame | Series | None = None,
764768
pairwise: bool | None = None,
765769
**kwargs,
766770
):
767771
return NotImplementedError
768772

769773
def cov(
770774
self,
771-
other: FrameOrSeriesUnion | None = None,
775+
other: DataFrame | Series | None = None,
772776
pairwise: bool | None = None,
773777
bias: bool = False,
774778
**kwargs,

pandas/core/window/expanding.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@
88

99
from pandas._typing import (
1010
Axis,
11-
FrameOrSeries
11+
FrameOrSeries,
1212
)
1313
from pandas.compat.numpy import function as nv
1414
from pandas.util._decorators import doc
1515

16+
from pandas import (
17+
DataFrame,
18+
Series,
19+
)
1620
from pandas.core.window.doc import (
1721
_shared_docs,
1822
args_compat,

pandas/io/formats/info.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,18 @@
1616

1717
from pandas._config import get_option
1818

19-
from pandas._typing import (
20-
Dtype,
21-
)
19+
from pandas._typing import Dtype
2220

2321
from pandas.core.indexes.api import Index
2422

2523
from pandas.io.formats import format as fmt
2624
from pandas.io.formats.printing import pprint_thing
2725

2826
if TYPE_CHECKING:
29-
from pandas.core.frame import DataFrame
27+
from pandas.core.frame import (
28+
DataFrame,
29+
Series,
30+
)
3031

3132

3233
def _put_str(s: str | Dtype, space: int) -> str:

pandas/plotting/_matplotlib/timeseries.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
from matplotlib.axes import Axes
4040

4141
from pandas import (
42+
DataFrame,
4243
DatetimeIndex,
4344
Index,
4445
Series,

pandas/plotting/_matplotlib/tools.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
from matplotlib.lines import Line2D
3030
from matplotlib.table import Table
3131

32+
from pandas import (
33+
DataFrame,
34+
Series,
35+
)
36+
3237

3338
def do_adjust_figure(fig: Figure):
3439
"""Whether fig has constrained_layout enabled."""

0 commit comments

Comments
 (0)