Skip to content

Commit 6a18b99

Browse files
committed
Merge branch 'main' into 37715-remove-mypy-ignore-VI
2 parents 3c50078 + 073156e commit 6a18b99

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+218
-220
lines changed

asv_bench/benchmarks/pandas_vb_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
try:
1818
import pandas._testing as tm
1919
except ImportError:
20-
import pandas.util.testing as tm # noqa:F401
20+
import pandas.util.testing as tm # noqa: F401
2121

2222

2323
numeric_dtypes = [

doc/source/user_guide/window.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ be calculated with :meth:`~Rolling.apply` by specifying a separate column of wei
9696
return arr
9797
9898
df = pd.DataFrame([[1, 2, 0.6], [2, 3, 0.4], [3, 4, 0.2], [4, 5, 0.7]])
99-
df.rolling(2, method="table", min_periods=0).apply(weighted_mean, raw=True, engine="numba") # noqa:E501
99+
df.rolling(2, method="table", min_periods=0).apply(weighted_mean, raw=True, engine="numba") # noqa: E501
100100
101101
.. versionadded:: 1.3
102102

pandas/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
try:
2222
# numpy compat
2323
from pandas.compat import (
24-
is_numpy_dev as _is_numpy_dev, # pyright: ignore # noqa:F401
24+
is_numpy_dev as _is_numpy_dev, # pyright: ignore[reportUnusedImport] # noqa: F401,E501
2525
)
2626
except ImportError as _err: # pragma: no cover
2727
_module = _err.name
@@ -41,7 +41,7 @@
4141
)
4242

4343
# let init-time option registration happen
44-
import pandas.core.config_init # pyright: ignore # noqa:F401
44+
import pandas.core.config_init # pyright: ignore[reportUnusedImport] # noqa: F401
4545

4646
from pandas.core.api import (
4747
# dtype

pandas/_config/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"using_copy_on_write",
1818
]
1919
from pandas._config import config
20-
from pandas._config import dates # pyright: ignore # noqa:F401
20+
from pandas._config import dates # pyright: ignore[reportUnusedImport] # noqa: F401
2121
from pandas._config.config import (
2222
_global_config,
2323
describe_option,

pandas/_libs/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# Below imports needs to happen first to ensure pandas top level
1414
# module gets monkeypatched with the pandas_datetime_CAPI
1515
# see pandas_datetime_exec in pd_datetime.c
16-
import pandas._libs.pandas_parser # noqa # isort: skip # type: ignore[reportUnusedImport]
17-
import pandas._libs.pandas_datetime # noqa # isort: skip # type: ignore[reportUnusedImport]
16+
import pandas._libs.pandas_parser # noqa: F401,E501 # isort: skip # type: ignore[reportUnusedImport]
17+
import pandas._libs.pandas_datetime # noqa: F401,E501 # isort: skip # type: ignore[reportUnusedImport]
1818
from pandas._libs.interval import Interval
1919
from pandas._libs.tslibs import (
2020
NaT,

pandas/_libs/lib.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ from enum import Enum
3030
class _NoDefault(Enum):
3131
no_default = ...
3232

33-
no_default: Final = _NoDefault.no_default # noqa
33+
no_default: Final = _NoDefault.no_default # noqa: PYI015
3434
NoDefault = Literal[_NoDefault.no_default]
3535

3636
i8max: int

pandas/core/arrays/datetimes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ def _box_func(self, x: np.datetime64) -> Timestamp | NaTType:
534534
# error: Return type "Union[dtype, DatetimeTZDtype]" of "dtype"
535535
# incompatible with return type "ExtensionDtype" in supertype
536536
# "ExtensionArray"
537-
def dtype(self) -> np.dtype[np.datetime64] | DatetimeTZDtype: # type: ignore[override] # noqa:E501
537+
def dtype(self) -> np.dtype[np.datetime64] | DatetimeTZDtype: # type: ignore[override] # noqa: E501
538538
"""
539539
The dtype for the DatetimeArray.
540540

pandas/core/dtypes/cast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,7 @@ def _ensure_nanosecond_dtype(dtype: DtypeObj) -> None:
12001200
Traceback (most recent call last):
12011201
...
12021202
TypeError: dtype=timedelta64[ps] is not supported. Supported resolutions are 's', 'ms', 'us', and 'ns'
1203-
""" # noqa:E501
1203+
""" # noqa: E501
12041204
msg = (
12051205
f"The '{dtype.name}' dtype has no unit. "
12061206
f"Please pass in '{dtype.name}[ns]' instead."

pandas/core/dtypes/dtypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ class PeriodDtype(PeriodDtypeBase, PandasExtensionDtype):
902902
# error: Incompatible types in assignment (expression has type
903903
# "Dict[int, PandasExtensionDtype]", base class "PandasExtensionDtype"
904904
# defined the type as "Dict[str, PandasExtensionDtype]") [assignment]
905-
_cache_dtypes: dict[BaseOffset, PeriodDtype] = {} # type: ignore[assignment] # noqa:E501
905+
_cache_dtypes: dict[BaseOffset, PeriodDtype] = {} # type: ignore[assignment] # noqa: E501
906906
__hash__ = PeriodDtypeBase.__hash__
907907
_freq: BaseOffset
908908

pandas/core/frame.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10431,7 +10431,7 @@ def corr(
1043110431
dogs cats
1043210432
dogs 1.0 NaN
1043310433
cats NaN 1.0
10434-
""" # noqa:E501
10434+
""" # noqa: E501
1043510435
data = self._get_numeric_data() if numeric_only else self
1043610436
cols = data.columns
1043710437
idx = cols.copy()
@@ -10676,7 +10676,7 @@ def corrwith(
1067610676
d 1.0
1067710677
e NaN
1067810678
dtype: float64
10679-
""" # noqa:E501
10679+
""" # noqa: E501
1068010680
axis = self._get_axis_number(axis)
1068110681
this = self._get_numeric_data() if numeric_only else self
1068210682

0 commit comments

Comments
 (0)