Skip to content

Commit 27d6a8a

Browse files
committed
ci: scope the no-assert lint to runtime code across the monorepo
The S101 per-file ignores only covered the root tests/ and src/zarr/testing/. The packages under packages/ inherit the root ruff config, so the rule fired on 1524 asserts in their tests, examples, and test-support modules and broke the ruff, Lint, pre-commit.ci, and zarr-http-server jobs. Widen the ignores to **/tests/**, **/examples/**, and **/testing/**, and exclude zarr-indexing's runtime source for now; its own asserts are tracked as a separate change. Assisted-by: ClaudeCode:claude-fable-5-1
1 parent 1473c4e commit 27d6a8a

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

‎pyproject.toml‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,15 @@ ignore = [
395395
]
396396

397397
[tool.ruff.lint.extend-per-file-ignores]
398-
"tests/**" = ["ANN001", "ANN201", "RUF029", "S101", "SIM117", "SIM300"]
399-
# test-support code (store conformance suite, hypothesis strategies) asserts on purpose
400-
"src/zarr/testing/**" = ["S101"]
398+
"tests/**" = ["ANN001", "ANN201", "RUF029", "SIM117", "SIM300"]
399+
# S101 (no assert) is for runtime code only. Tests, examples, and test-support
400+
# packages (store conformance suite, hypothesis strategies) assert on purpose.
401+
# The globs cover the root package and every package under packages/.
402+
"**/tests/**" = ["S101"]
403+
"**/examples/**" = ["S101"]
404+
"**/testing/**" = ["S101"]
405+
# zarr-indexing still has asserts in runtime code; tracked as a separate change.
406+
"packages/zarr-indexing/src/**" = ["S101"]
401407

402408
[tool.mypy]
403409
files = ["src", "tests"]

0 commit comments

Comments
 (0)