diff --git a/pandas/_testing/__init__.py b/pandas/_testing/__init__.py index c51ceb750c338..3274d75128917 100644 --- a/pandas/_testing/__init__.py +++ b/pandas/_testing/__init__.py @@ -136,24 +136,16 @@ def set_testing_mode(): # set the testing mode filters testing_mode = os.environ.get("PANDAS_TESTING_MODE", "None") if "deprecate" in testing_mode: - # pandas\_testing.py:119: error: Argument 2 to "simplefilter" has - # incompatible type "Tuple[Type[DeprecationWarning], - # Type[ResourceWarning]]"; expected "Type[Warning]" - warnings.simplefilter( - "always", _testing_mode_warnings # type: ignore[arg-type] - ) + for category in _testing_mode_warnings: + warnings.simplefilter("always", category) def reset_testing_mode(): # reset the testing mode filters testing_mode = os.environ.get("PANDAS_TESTING_MODE", "None") if "deprecate" in testing_mode: - # pandas\_testing.py:126: error: Argument 2 to "simplefilter" has - # incompatible type "Tuple[Type[DeprecationWarning], - # Type[ResourceWarning]]"; expected "Type[Warning]" - warnings.simplefilter( - "ignore", _testing_mode_warnings # type: ignore[arg-type] - ) + for category in _testing_mode_warnings: + warnings.simplefilter("ignore", category) set_testing_mode() diff --git a/pandas/core/indexes/period.py b/pandas/core/indexes/period.py index 8fe92ed757401..fe9560a1f2f3f 100644 --- a/pandas/core/indexes/period.py +++ b/pandas/core/indexes/period.py @@ -164,18 +164,21 @@ def to_timestamp(self, freq=None, how="start") -> DatetimeIndex: arr = self._data.to_timestamp(freq, how) return DatetimeIndex._simple_new(arr, name=self.name) + # https://github.com/python/mypy/issues/1362 # error: Decorated property not supported [misc] @property # type:ignore[misc] @doc(PeriodArray.hour.fget) def hour(self) -> Int64Index: return Int64Index(self._data.hour, name=self.name) + # https://github.com/python/mypy/issues/1362 # error: Decorated property not supported [misc] @property # type:ignore[misc] @doc(PeriodArray.minute.fget) def minute(self) -> Int64Index: return Int64Index(self._data.minute, name=self.name) + # https://github.com/python/mypy/issues/1362 # error: Decorated property not supported [misc] @property # type:ignore[misc] @doc(PeriodArray.second.fget)