diff --git a/ndcube/meta.py b/ndcube/meta.py index 27b9a2a63..3aa80b6da 100644 --- a/ndcube/meta.py +++ b/ndcube/meta.py @@ -436,7 +436,7 @@ def __getitem__(self, item): # Slice metadata value. try: new_value = value[new_item] - except Exception: + except Exception: # noqa: BLE001 # If value cannot be sliced by fancy slicing, convert it # it to an array, slice it, and then if necessary, convert # it back to its original type. diff --git a/ndcube/tests/helpers.py b/ndcube/tests/helpers.py index 6fceb35e2..a9e7d0727 100644 --- a/ndcube/tests/helpers.py +++ b/ndcube/tests/helpers.py @@ -110,7 +110,7 @@ def assert_metas_equal(test_input, expected_output): for test_value, expected_value in zip(test_input.values(), expected_output.values()): try: assert test_value == expected_value - except ValueError as err: + except ValueError as err: # noqa: PERF203 if multi_element_msg in err.args[0]: assert np.allclose(test_value, expected_value) for key in test_input.axes.keys():