Skip to content

Commit dca6c7f

Browse files
authored
remove unnecessary noqas (#36684)
1 parent 6f3e227 commit dca6c7f

20 files changed

+33
-37
lines changed

pandas/core/algorithms.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
from pandas.core.indexers import validate_indices
6161

6262
if TYPE_CHECKING:
63-
from pandas import Categorical, DataFrame, Series # noqa:F401
63+
from pandas import Categorical, DataFrame, Series
6464

6565
_shared_docs: Dict[str, str] = {}
6666

pandas/core/arrays/boolean.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
from .masked import BaseMaskedArray, BaseMaskedDtype
2828

2929
if TYPE_CHECKING:
30-
import pyarrow # noqa: F401
30+
import pyarrow
3131

3232

3333
@register_extension_dtype
@@ -98,7 +98,7 @@ def __from_arrow__(
9898
"""
9999
Construct BooleanArray from pyarrow Array/ChunkedArray.
100100
"""
101-
import pyarrow # noqa: F811
101+
import pyarrow
102102

103103
if isinstance(array, pyarrow.Array):
104104
chunks = [array]

pandas/core/arrays/integer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from .masked import BaseMaskedArray, BaseMaskedDtype
3434

3535
if TYPE_CHECKING:
36-
import pyarrow # noqa: F401
36+
import pyarrow
3737

3838

3939
class _IntegerDtype(BaseMaskedDtype):
@@ -115,7 +115,7 @@ def __from_arrow__(
115115
"""
116116
Construct IntegerArray from pyarrow Array/ChunkedArray.
117117
"""
118-
import pyarrow # noqa: F811
118+
import pyarrow
119119

120120
from pandas.core.arrays._arrow_utils import pyarrow_array_to_numpy_and_mask
121121

pandas/core/arrays/sparse/dtype.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from pandas.core.dtypes.missing import isna, na_value_for_dtype
2323

2424
if TYPE_CHECKING:
25-
from pandas.core.arrays.sparse.array import SparseArray # noqa: F401
25+
from pandas.core.arrays.sparse.array import SparseArray
2626

2727

2828
@register_extension_dtype
@@ -180,7 +180,7 @@ def construct_array_type(cls) -> Type["SparseArray"]:
180180
-------
181181
type
182182
"""
183-
from pandas.core.arrays.sparse.array import SparseArray # noqa: F811
183+
from pandas.core.arrays.sparse.array import SparseArray
184184

185185
return SparseArray
186186

pandas/core/arrays/string_.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from pandas.core.missing import isna
1919

2020
if TYPE_CHECKING:
21-
import pyarrow # noqa: F401
21+
import pyarrow
2222

2323

2424
@register_extension_dtype
@@ -79,7 +79,7 @@ def __from_arrow__(
7979
"""
8080
Construct StringArray from pyarrow Array/ChunkedArray.
8181
"""
82-
import pyarrow # noqa: F811
82+
import pyarrow
8383

8484
if isinstance(array, pyarrow.Array):
8585
chunks = [array]

pandas/core/dtypes/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from pandas.core.dtypes.generic import ABCDataFrame, ABCIndexClass, ABCSeries
1313

1414
if TYPE_CHECKING:
15-
from pandas.core.arrays import ExtensionArray # noqa: F401
15+
from pandas.core.arrays import ExtensionArray
1616

1717

1818
class ExtensionDtype:

pandas/core/dtypes/cast.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777

7878
if TYPE_CHECKING:
7979
from pandas import Series
80-
from pandas.core.arrays import ExtensionArray # noqa: F401
80+
from pandas.core.arrays import ExtensionArray
8181

8282
_int8_max = np.iinfo(np.int8).max
8383
_int16_max = np.iinfo(np.int16).max

pandas/core/dtypes/dtypes.py

+7-11
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,10 @@
2929
from pandas.core.dtypes.inference import is_bool, is_list_like
3030

3131
if TYPE_CHECKING:
32-
import pyarrow # noqa: F401
32+
import pyarrow
3333

34-
from pandas import Categorical # noqa: F401
35-
from pandas.core.arrays import ( # noqa: F401
36-
DatetimeArray,
37-
IntervalArray,
38-
PeriodArray,
39-
)
34+
from pandas import Categorical
35+
from pandas.core.arrays import DatetimeArray, IntervalArray, PeriodArray
4036

4137
str_type = str
4238

@@ -457,7 +453,7 @@ def construct_array_type(cls) -> Type["Categorical"]:
457453
-------
458454
type
459455
"""
460-
from pandas import Categorical # noqa: F811
456+
from pandas import Categorical
461457

462458
return Categorical
463459

@@ -706,7 +702,7 @@ def construct_array_type(cls) -> Type["DatetimeArray"]:
706702
-------
707703
type
708704
"""
709-
from pandas.core.arrays import DatetimeArray # noqa: F811
705+
from pandas.core.arrays import DatetimeArray
710706

711707
return DatetimeArray
712708

@@ -959,7 +955,7 @@ def __from_arrow__(
959955
"""
960956
Construct PeriodArray from pyarrow Array/ChunkedArray.
961957
"""
962-
import pyarrow # noqa: F811
958+
import pyarrow
963959

964960
from pandas.core.arrays import PeriodArray
965961
from pandas.core.arrays._arrow_utils import pyarrow_array_to_numpy_and_mask
@@ -1157,7 +1153,7 @@ def __from_arrow__(
11571153
"""
11581154
Construct IntervalArray from pyarrow Array/ChunkedArray.
11591155
"""
1160-
import pyarrow # noqa: F811
1156+
import pyarrow
11611157

11621158
from pandas.core.arrays import IntervalArray
11631159

pandas/core/groupby/generic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
from pandas.plotting import boxplot_frame_groupby
8484

8585
if TYPE_CHECKING:
86-
from pandas.core.internals import Block # noqa:F401
86+
from pandas.core.internals import Block
8787

8888

8989
NamedAgg = namedtuple("NamedAgg", ["column", "aggfunc"])

pandas/core/indexes/accessors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from pandas.core.indexes.timedeltas import TimedeltaIndex
2525

2626
if TYPE_CHECKING:
27-
from pandas import Series # noqa:F401
27+
from pandas import Series
2828

2929

3030
class Properties(PandasDelegate, PandasObject, NoNewAttributesMixin):

pandas/core/indexes/interval.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
from pandas.core.ops import get_op_result_name
5858

5959
if TYPE_CHECKING:
60-
from pandas import CategoricalIndex # noqa:F401
60+
from pandas import CategoricalIndex
6161

6262
_index_doc_kwargs = dict(ibase._index_doc_kwargs)
6363

pandas/core/indexes/multi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
)
6666

6767
if TYPE_CHECKING:
68-
from pandas import Series # noqa:F401
68+
from pandas import Series
6969

7070
_index_doc_kwargs = dict(ibase._index_doc_kwargs)
7171
_index_doc_kwargs.update(

pandas/core/indexing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
from pandas.core.indexes.api import Index
3636

3737
if TYPE_CHECKING:
38-
from pandas import DataFrame, Series # noqa:F401
38+
from pandas import DataFrame, Series
3939

4040
# "null slice"
4141
_NS = slice(None, None)

pandas/core/internals/construction.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
)
5353

5454
if TYPE_CHECKING:
55-
from pandas import Series # noqa:F401
55+
from pandas import Series
5656

5757
# ---------------------------------------------------------------------
5858
# BlockManager Interface
@@ -244,7 +244,7 @@ def init_dict(data: Dict, index, columns, dtype: Optional[DtypeObj] = None):
244244
arrays: Union[Sequence[Any], "Series"]
245245

246246
if columns is not None:
247-
from pandas.core.series import Series # noqa:F811
247+
from pandas.core.series import Series
248248

249249
arrays = Series(data, index=columns, dtype=object)
250250
data_names = arrays.index

pandas/core/internals/ops.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from pandas._typing import ArrayLike
77

88
if TYPE_CHECKING:
9-
from pandas.core.internals.blocks import Block # noqa:F401
10-
from pandas.core.internals.managers import BlockManager # noqa:F401
9+
from pandas.core.internals.blocks import Block
10+
from pandas.core.internals.managers import BlockManager
1111

1212

1313
BlockPairInfo = namedtuple(

pandas/core/ops/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
)
5656

5757
if TYPE_CHECKING:
58-
from pandas import DataFrame, Series # noqa:F401
58+
from pandas import DataFrame, Series
5959

6060
# -----------------------------------------------------------------------------
6161
# constants

pandas/core/reshape/melt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from pandas.core.tools.numeric import to_numeric
2020

2121
if TYPE_CHECKING:
22-
from pandas import DataFrame, Series # noqa: F401
22+
from pandas import DataFrame, Series
2323

2424

2525
@Appender(_shared_docs["melt"] % dict(caller="pd.melt(df, ", other="DataFrame.melt"))

pandas/core/reshape/merge.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
from pandas.core.sorting import is_int64_overflow_possible
5151

5252
if TYPE_CHECKING:
53-
from pandas import DataFrame # noqa:F401
53+
from pandas import DataFrame
5454

5555

5656
@Substitution("\nleft : DataFrame")

pandas/core/sorting.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ def ensure_key_mapped(values, key: Optional[Callable], levels=None):
469469
levels : Optional[List], if values is a MultiIndex, list of levels to
470470
apply the key to.
471471
"""
472-
from pandas.core.indexes.api import Index # noqa:F811
472+
from pandas.core.indexes.api import Index
473473

474474
if not key:
475475
return values

pandas/core/tools/datetimes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
from pandas.core.indexes.datetimes import DatetimeIndex
5454

5555
if TYPE_CHECKING:
56-
from pandas._libs.tslibs.nattype import NaTType # noqa:F401
56+
from pandas._libs.tslibs.nattype import NaTType
5757

58-
from pandas import Series # noqa:F401
58+
from pandas import Series
5959

6060
# ---------------------------------------------------------------------
6161
# types used in annotations

0 commit comments

Comments
 (0)