Stricter rules on pytest.raises, requiring match for generic error types

Closes #560
This commit is contained in:
Julian Stirling 2025-10-28 17:20:40 +00:00
parent a89306b3b8
commit e4cb48eb6d
3 changed files with 34 additions and 15 deletions

View file

@ -136,8 +136,6 @@ ignore = [
"PLR2004", # Ignore magic values in comparison for now. It doesn't seem we can set
# allowed magic values and a number of our magic values are not really
# magic (such as 255 when doing uint8 maths)
"PT011", # Ignore pytest.raises being used on too general expectations without a
# match. We may need to revisit this.
"SIM105", # Not enforcing use of `contextlib.suppress(NotConnectedToServerError)`
# instead of `try`-`except`-`pass`
]