Repository navigation
Widen the ruff rule set, check tests with ty, bump the lint pins - #95
Merged
Merged
Conversation
No workflow ran pytest: lint.yaml, docs.yml and publish.yaml cover style, docs and wheels, and the only executed check of library behaviour was the one-task smoke script in publish.yaml. - tests.yaml: pull requests, pushes to main and manual dispatch; matrix is the requires-python floor and newest (3.11, 3.14) x highest/lowest-direct; stable Rust toolchain and cargo cache for the maturin build; setup-uv@v6 pins the interpreter; `uv run pytest --cov=daisy` with term-missing and xml reports. - pyproject: numpy>=2 (tests/test_skip_mask.py imports it at module level, so a plain `uv sync && uv run pytest` errored at collection) and pytest-cov>=6 in the dev group; `testpaths = ["tests"]` so a bare `pytest` does not collect examples/stress_test.py, which runs a 35 000-block pipeline at import. - uv.lock updated for the two additions. Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
test_block_function_gets_real_parallelism and test_inline_zero_arg_worker_gets_real_parallelism compare wall time across worker counts. On an idle multi-core machine they measure 3x and more; on GitHub's shared runners the first CI run measured 1.1x-1.5x on all four matrix jobs, clearing neither gate while staying far from the ~0.6x GIL-serialized regression they guard against. They still run locally; on CI (CI=true) they are skipped with that reason. Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
[tool.ruff.lint] now selects E, F, W, I, UP and B (E501 left to the formatter), with E402 allowed in tutorials/examples and F401 in __init__.py. The rest of this commit is `ruff check --fix` (plus the semantics-preserving unsafe fixes for `zip(strict=False)`, `X | None` annotations and printf formatting) and `ruff format`. Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
[tool.ty.src] now lists the package and tests explicitly and the lint job runs a bare `ty check`, so CI and contributors run the same command. The tests/daisy_compat exclusion is gone: that directory checks clean. ruff moves to 0.17.3 and ty to 0.0.96 in the lint group (uv.lock updated). Three test diagnostics fixed: an unused `ty: ignore` in test_resources.py, a recorder whose `finish` is None until the run ends (annotated, asserted before use) and a helper whose `context` keyword was annotated as optional but never is. Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
main carries the squash of #94; this branch had the same changes as separate commits, so pyproject.toml and uv.lock conflicted trivially. Resolved to this branch's versions (main's content plus the lint pins) and re-locked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ruff
[tool.ruff.lint]selectsE,F,W,I,UP,B(wasE4,E7,E9,F,I), ignoresE501, allowsE402in tutorials/examples andF401in__init__.py. The findings were 11zipcalls without explicitstrict=(nowstrict=False), 8 unused loop variables (renamed_x), one deprecated typing import and one printf string; all applied byruff check --fixplusruff formaton two files.ty
[tool.ty.src]now listsdaisy-py/python/daisyandtestsexplicitly, and the lint job runs a barety check, so CI and contributors run the same command and the tests are checked too. Thetests/daisy_compatexclusion is gone: that directory checks clean. The lint group moves toruff==0.17.3andty==0.0.96(uv.lockupdated). Three test diagnostics fixed: an unusedty: ignoreintest_resources.py, a recorder whosefinishisNoneuntil the run ends (annotated, asserted before use), and a helper whosecontextkeyword was annotated optional but never is.unresolved-importstays ignored, as before, until the lint group can see numpy and rich.Counters: 1 rule at ignore (unchanged), 0
ty: ignorecomments, 0 excludes.Verified locally
uv run --only-group lint ruff check .,ruff format --check .andty checkall clean; the two touched test files pass.🤖 Generated with Claude Code