From 219630f2a69d6ec58b8d1bfade6492f0a7600c7c Mon Sep 17 00:00:00 2001 From: Vamsi Verma Date: Mon, 10 Oct 2022 07:09:31 +0000 Subject: [PATCH 1/3] pylint: fix misplaced-bare-raise --- pandas/core/internals/blocks.py | 2 +- pyproject.toml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pandas/core/internals/blocks.py b/pandas/core/internals/blocks.py index afe18493ec276..31f9a5199f666 100644 --- a/pandas/core/internals/blocks.py +++ b/pandas/core/internals/blocks.py @@ -1983,7 +1983,7 @@ def _catch_deprecated_value_error(err: Exception) -> None: # IntervalDtype mismatched 'closed' pass elif "Timezones don't match" not in str(err): - raise + raise err class DatetimeLikeBlock(NDArrayBackedExtensionBlock): diff --git a/pyproject.toml b/pyproject.toml index a1feba998bc50..533ecb4d318cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,6 @@ disable = [ "import-error", "invalid-repr-returned", "invalid-unary-operand-type", - "misplaced-bare-raise", "no-member", "no-method-argument", "no-name-in-module", From d6331010636b32b68cb8a069c71de77c35e688c8 Mon Sep 17 00:00:00 2001 From: Vamsi Verma Date: Mon, 10 Oct 2022 18:11:04 +0000 Subject: [PATCH 2/3] ignore pylint misplaced-bare-raise --- pandas/core/internals/blocks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/internals/blocks.py b/pandas/core/internals/blocks.py index 31f9a5199f666..2cf0de27bc1a1 100644 --- a/pandas/core/internals/blocks.py +++ b/pandas/core/internals/blocks.py @@ -1983,7 +1983,7 @@ def _catch_deprecated_value_error(err: Exception) -> None: # IntervalDtype mismatched 'closed' pass elif "Timezones don't match" not in str(err): - raise err + raise # pylint: disable=misplaced-bare-raise GH49018 class DatetimeLikeBlock(NDArrayBackedExtensionBlock): From c37974e7baa1e0baecb6a14b37a988a35ee0891a Mon Sep 17 00:00:00 2001 From: Vamsi Verma Date: Tue, 11 Oct 2022 03:48:48 +0000 Subject: [PATCH 3/3] Revert "ignore pylint misplaced-bare-raise" This reverts commit d6331010636b32b68cb8a069c71de77c35e688c8. --- pandas/core/internals/blocks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/internals/blocks.py b/pandas/core/internals/blocks.py index 2cf0de27bc1a1..31f9a5199f666 100644 --- a/pandas/core/internals/blocks.py +++ b/pandas/core/internals/blocks.py @@ -1983,7 +1983,7 @@ def _catch_deprecated_value_error(err: Exception) -> None: # IntervalDtype mismatched 'closed' pass elif "Timezones don't match" not in str(err): - raise # pylint: disable=misplaced-bare-raise GH49018 + raise err class DatetimeLikeBlock(NDArrayBackedExtensionBlock):