Skip to content

Commit c88bb30

Browse files
Copilotzkoppert
andcommitted
fix: Add pylint disable comments for broad exception catches in tests
Co-authored-by: zkoppert <[email protected]>
1 parent 4ea1169 commit c88bb30

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test_exceptions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def test_can_catch_as_github3_not_found_error(self):
4242
raise OptionalFileNotFoundError(resp=mock_resp)
4343
except github3.exceptions.NotFoundError as e:
4444
self.assertIsInstance(e, OptionalFileNotFoundError)
45-
except Exception:
45+
except Exception: # pylint: disable=broad-exception-caught
4646
self.fail(
4747
"OptionalFileNotFoundError should be catchable as github3.exceptions.NotFoundError"
4848
)
@@ -56,7 +56,7 @@ def test_can_catch_specifically(self):
5656
raise OptionalFileNotFoundError(resp=mock_resp)
5757
except OptionalFileNotFoundError as e:
5858
self.assertIsInstance(e, OptionalFileNotFoundError)
59-
except Exception:
59+
except Exception: # pylint: disable=broad-exception-caught
6060
self.fail("OptionalFileNotFoundError should be catchable specifically")
6161

6262
def test_optional_file_not_found_error_properties(self):
@@ -127,7 +127,7 @@ def test_check_optional_file_can_catch_as_not_found_error(self):
127127
check_optional_file(mock_repo, "missing.yml")
128128
except github3.exceptions.NotFoundError as e:
129129
self.assertIsInstance(e, OptionalFileNotFoundError)
130-
except Exception:
130+
except Exception: # pylint: disable=broad-exception-caught
131131
self.fail(
132132
"Should be able to catch OptionalFileNotFoundError as NotFoundError"
133133
)

0 commit comments

Comments
 (0)