(style) ruff pass: import sorting, unused imports, typing-stub cleanup - #71
Open
rhoadesScholar wants to merge 1 commit into
Open
(style) ruff pass: import sorting, unused imports, typing-stub cleanup#71rhoadesScholar wants to merge 1 commit into
rhoadesScholar wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KxYd8bCjgZLoESSe3smbwF
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.
Split out of #70 so the functional changes there stay reviewable. No behavior changes — this is a
ruff --fixpass over the Python sources.Stacked on
v2.0_patch: merge #70 first, or retarget this tov2.0afterwards.What's here
44 files, all Python/stubs (no Rust, no docs, no test logic):
I001) — stdlib / third-party / first-party grouping acrossdaisy-py/python/daisy/,tests/,benchmarks/,examples/.benchmarks/bench_dependency_graph.py,benchmarks/bench_worker_scaling.py,tests/test_worker_restarts.pyeach imported the same module twice.F401) —pytestfromtests/daisy_compat/test_clients_close.py,tests/daisy_compat/test_dead_workers.py,tests/test_tcp_client.py;threadingfromexamples/mws.pyandtests/test_tcp_client.py;subprocess/sysfromtests/test_context_passing.py;tempfilefromtests/test_done_marker.py;Blockfromtests/test_tcp_client.py.# noqaremovals (RUF100) — the suppressed rules no longer fire on those lines.Callablemovedtyping→collections.abc(UP035) in_daisy.pyi._daisy.pyi— three redundant__repr__declarations dropped (PYI029: stubs inheritobject.__repr__), andtimeout: float | int | object | None→float | object | None(PYI041:intis redundant besidefloatunder the numeric tower).Verification that it's semantically neutral
An AST-level comparison of every changed file's import set (name + alias, order-insensitive) before vs. after confirms the only net changes are the 9 removals, the 3 dedups, and the
Callablemodule move — everything else is pure reordering. Each removed name was checked to have zero remaining references (the one lingeringBlockmatch intests/test_tcp_client.pyis inside a comment).Full suites pass on this branch and on
v2.0_patchidentically:pytest tests/204 passed / 1 xfailed,cargo test -p daisy-core46 passed.Not in scope
The tree is not lint-clean after this —
ruff check .still reports 74 findings, dominated byBLE001(18 blind excepts) andS110(15try/except/pass), most of which are deliberate best-effort cleanup paths in the logging and worker-teardown code. There's also no ruff config inpyproject.tomland no lint CI job, so none of this is enforced going forward. Happy to follow up with a pinned[tool.ruff]section plus a CI check if you want the invariant to hold.🤖 Generated with Claude Code
https://claude.ai/code/session_01KxYd8bCjgZLoESSe3smbwF