Skip to content

Commit 33d1b16

Browse files
authored
Enable Ruff TRY (tryceratops) (#13359)
1 parent 9c959a7 commit 33d1b16

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ select = [
4646
"N", # pep8-naming
4747
"PGH", # pygrep-hooks
4848
"RUF", # Ruff-specific and unused-noqa
49+
"TRY", # tryceratops
4950
"UP", # pyupgrade
5051
"YTT", # flake8-2020
5152
# Flake8 base rules
@@ -116,6 +117,8 @@ ignore = [
116117
# Used for direct, non-subclass type comparison, for example: `type(val) is str`
117118
# see https://github.com/astral-sh/ruff/issues/6465
118119
"E721", # Do not compare types, use `isinstance()`
120+
# Mostly from scripts and tests, it's ok to have messages passed directly to exceptions
121+
"TRY003", # Avoid specifying long messages outside the exception class
119122
# Slower and more verbose https://github.com/astral-sh/ruff/issues/7871
120123
"UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)`
121124
###

0 commit comments

Comments
 (0)