Repository navigation
Adopt the shared ruff rule set, configure ty, pin both - #6
Merged
Merged
Conversation
[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>
- roi.py: f-string instead of printf formatting in the dimension assert. - test_questions.py: the two blind `pytest.raises(Exception)` now name the exception the call raises (TypeError, AssertionError). Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
[tool.ty.src] names the checked scope (src, tests). ruff and ty are pinned with == in the dev group so CI stops drifting with releases. The four diagnostics were all intentional misuse in tests (tuple and string arithmetic on Coordinate, a None offset for Roi); their mypy-era `type: ignore` comments, which ty does not honour, become `ty: ignore[<rule>]` with the reason. Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
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(replacing the interim pin of ruff's old defaults), ignoresE501(the formatter owns line length), allowsE402in tutorials/examples andF401in__init__.py. Two commits:ruff check --fixandruff format, including the semantics-preserving unsafe fixes:zip(..., strict=False)made explicit (17 sites),Optional[X]→X | None, printf → f-string.roi.pyas an f-string, and the two blindpytest.raises(Exception)intest_questions.pynow name what the call raises (TypeError,AssertionError).ty
[tool.ty.src] include = ["src", "tests"]. ruff and ty are pinned with==in the dev group (0.17.3, 0.0.96) so the jobs stop drifting with releases. The four diagnostics were intentional misuse in tests (tuple and string arithmetic onCoordinate, aNoneoffset forRoi); their mypy-eratype: ignorecomments becomety: ignore[<rule>] # intentional misuse.Counters: 0 rules at warn, 4
ty: ignorecomments, 0 excludes.Verified locally
ruff check .,ruff format --check .andty checkall clean;pytest15 passed, 1 xfailed.🤖 Generated with Claude Code