Skip to content

Commit e166477

Browse files
Enforce ruff/tryceratops rules (TRY)
1 parent 51dc58b commit e166477

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

distutils/extension.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def __init__(
105105
**kw, # To catch unknown keywords
106106
):
107107
if not isinstance(name, str):
108-
raise AssertionError("'name' must be a string")
108+
raise AssertionError("'name' must be a string") # noqa: TRY004
109109
if not (
110110
isinstance(sources, list)
111111
and all(isinstance(v, (str, os.PathLike)) for v in sources)

ruff.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ extend-select = [
88
"ISC",
99
"RUF010",
1010
"RUF100",
11+
"TRY",
1112
"UP",
1213
]
1314
ignore = [
15+
"TRY003",
1416
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
1517
"W191",
1618
"E111",

0 commit comments

Comments
 (0)