style: adopt ruff (format + lint) at 88, replacing black/isort/flake8
Format-only: Python files are AST-identical apart from import order. pre-commit end-of-file/trailing-whitespace fixes applied repo-wide. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -160,7 +160,9 @@ def norm(src):
|
||||
tree = ast.parse(src)
|
||||
imports, rest = [], []
|
||||
for node in tree.body:
|
||||
(imports if isinstance(node, (ast.Import, ast.ImportFrom)) else rest).append(node)
|
||||
(imports if isinstance(node, (ast.Import, ast.ImportFrom)) else rest).append(
|
||||
node
|
||||
)
|
||||
for node in imports:
|
||||
node.names = sorted(node.names, key=lambda a: (a.name, a.asname or ""))
|
||||
return sorted(ast.dump(n) for n in imports), [ast.dump(n) for n in rest]
|
||||
@@ -876,8 +878,7 @@ import pytest # add to the imports
|
||||
|
||||
|
||||
@pytest.mark.skipif(not VERIFY_SCRIPT.exists(), reason="added with the release task")
|
||||
def test_verify_script_covers_matrix():
|
||||
...
|
||||
def test_verify_script_covers_matrix(): ...
|
||||
```
|
||||
Run again. Expected: all pass, 1 skipped.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user