diff --git a/pandas/_testing/_io.py b/pandas/_testing/_io.py index 9ad0d13e7317e..bef2730ec630b 100644 --- a/pandas/_testing/_io.py +++ b/pandas/_testing/_io.py @@ -225,7 +225,7 @@ def wrapper(*args, **kwargs): ) try: return t(*args, **kwargs) - except Exception as err: + except Exception as err: # pylint: disable=broad-except errno = getattr(err, "errno", None) if not errno and hasattr(errno, "reason"): # error: "Exception" has no attribute "reason" diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py index 54fa9629fecd4..4426be266bb69 100644 --- a/pandas/core/dtypes/cast.py +++ b/pandas/core/dtypes/cast.py @@ -494,7 +494,7 @@ def maybe_cast_to_extension_array( try: result = cls._from_sequence(obj, dtype=dtype) - except Exception: + except Exception: # pylint: disable=broad-except # We can't predict what downstream EA constructors may raise result = obj return result