Violations TRY0xx - Exception Classes Code Description TRY002 Create your own exception TRY003 Avoid specifying long messages outside the exception class TRY004 Prefer TypeError exception for invalid type TRY005 (ENABLED through check_pickable) Define __reduce__ to make exception pickable TRY006 (ENABLED through allowed_base_exceptions) Inheriting from non defined base exception TRY1xx - General Code Description TRY100 (EXPERIMENTAL) Check to continue TRY101 Too many try blocks TRY2xx - Except blocks Code Description TRY200 Use raise Exception from TRY201 Simply use raise TRY202 Don't ignore a broad exception without even logging TRY203 Useless try-except TRY3xx - Try blocks Code Description TRY300 Consider adding an else block TRY301 Avoid direct raises in try body TRY4xx - Logging usage Code Description TRY400 Use logging .exception instead of .error TRY401 Do not log the exception object