Skip to content

Commit f0c8c36

Browse files
committed
style: disable TRY003
Disable rule that wants long exception error messages to be defined in the Error class itself. This makes some sense for custom error classes. However it's not appropriate to define custom error classes for every different error case. Generally a common error class is used in such cases, for example `RuntimeError` and `ValueError`. Signed-off-by: James McCorrie <[email protected]>
1 parent b497eb5 commit f0c8c36

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ extend-select = ["W391", "E303"]
8282
allowed-confusables = [""]
8383
ignore = [
8484
"D203", "D213", "COM812", "ISC001",
85-
"FIX", "TD", "S603", "S607",
85+
"FIX", "TD", "S603", "S607", "TRY003",
8686
]
8787

8888
[tool.ruff.lint.per-file-ignores]

ruff-ci.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@ extend-select = ["W391", "E303"]
1313
allowed-confusables = [""]
1414

1515
ignore = [
16+
# Disabled permanently
1617
"D203",
1718
"D213",
1819
"COM812",
1920
"ISC001",
2021
"FIX",
2122
"TD",
23+
"S603",
24+
"S607",
25+
"TRY003",
2226

2327
# High priority fixes
2428
"N803",
@@ -99,9 +103,7 @@ ignore = [
99103
"S202",
100104
"S311",
101105
"S602",
102-
"S603",
103106
"S605",
104-
"S607",
105107
"SIM115",
106108
"SLF001",
107109
"SLOT002",

0 commit comments

Comments
 (0)