Skip to content

Commit b709211

Browse files
authored
fix: make standalone helper a little nicer before removing it (#676)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 107064c commit b709211

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

helpers/missing_ruff.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import argparse
99
import json
1010
import subprocess
11+
import sys
1112
from collections.abc import Iterator
1213
from pathlib import Path
1314

@@ -43,9 +44,14 @@ def process_dir(path: Path) -> None:
4344
pyproject = tomllib.load(f)
4445

4546
match pyproject:
46-
case {"tool": {"ruff": {"lint": {"extend-select": selection}}}}:
47+
case {
48+
"tool": {
49+
"ruff": {"lint": {"extend-select": selection} | {"select": selection}}
50+
}
51+
}:
4752
selected = frozenset(selection)
4853
case _:
54+
print("[red]Rules not found", file=sys.stderr)
4955
raise SystemExit(1)
5056

5157
linter_txt = subprocess.run(

0 commit comments

Comments
 (0)