Repository navigation
chore: sync pre-commit hook versions with uv.lock; make Instruments real enum members - #39
Merged
Merged
Conversation
sync-with-uv rewrites the ruff and mypy revs, and the mypy dependencies marked `# sync-with-uv`, to the versions uv.lock pins, so the hooks lint with the same tools as the project. That moves mypy from 1.19.1 to 2.3.0 and ruff from 0.15.7 to 0.15.21. mypy 2.3 found that Instruments had no members: an Enum turns a function value into a method, so Instruments.REDIS was the bare function and list(Instruments) was empty; instrument_otel worked only because it calls whatever it is given. Each value is now an enum.member, and a test pins that. The three test_meta reads through SelfSustaining's class forwarding get the `# type: ignore[misc]` the repo uses for that pattern. Version 0.5.8. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QA7Vjn4bbjxRsvyz8DNHPQ
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.
revs of ruff and mypy, and the mypyadditional_dependenciesmarked# sync-with-uv, equal to the versions inuv.lock. mypy moves 1.19.1 → 2.3.0, ruff 0.15.7 → 0.15.21, and the pinned mypy deps to the locked pydantic, typing-extensions, mypy-extensions and types-pyyaml.returnsisn't inuv.lock(only mypy's plugin uses it), so it stays unpinned.Instrumentshad no members. AnEnumturns a function value into a method, soInstruments.REDISwas the bare function andlist(Instruments) == [];instrument_otelonly worked because it calls whatever it gets. mypy 2.3 flagged it. Each value is nowenum.member(...);instrument_otelalready uses.valuefor members. No service referencesInstrumentsdirectly. A test pins the members.tests/test_meta.py: the three reads throughSelfSustaining's class forwarding get# type: ignore[misc], as the repo allows for that pattern.Verification:
pytest282 passed;prek run --all-filesclean at mypy 2.3.0 and ruff 0.15.21; a secondsync-with-uvrun changes nothing.🤖 Generated with Claude Code
https://claude.ai/code/session_01QA7Vjn4bbjxRsvyz8DNHPQ