chore: track uv.lock for reproducible installs#70
Merged
Conversation
Remove uv.lock from .gitignore and commit the lockfile so installs are reproducible across environments. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Closed
Pyright 1.1.409 (newly pinned via uv.lock) narrows Any-typed instance attributes to None after an `is None` check and does not re-broaden across the intervening `await self.start()` call. Alias the attribute into a local Any variable after the lazy-start so type flow is clear. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
miguelgfierro
approved these changes
Apr 27, 2026
ancongui
pushed a commit
that referenced
this pull request
May 31, 2026
chore: track uv.lock for reproducible installs
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.
Summary
uv.lockfrom.gitignoreand commit the lockfile so dependency resolution is reproducible across dev machines and CI.kafka.py,rabbitmq.py,redis.py) to satisfy pyright's stricter narrowing in 1.1.409.Why the queue files changed
The committed
uv.lockpinspyright==1.1.409, which is stricter about narrowingAny-typed instance attributes. Each producer uses a lazy-start pattern:Pyright 1.1.409 narrows
self._producertoNoneinside theis Nonebranch and does not re-broaden across the interveningawait self.start()call (it can't see thatstart()reassigns the attribute), so it reportsreportOptionalMemberAccesson the subsequent member access. The runtime behavior is correct; the limitation is in pyright's flow analysis.Fix: after the lazy-start block, alias the attribute into a local
Anyvariable and use that. No behavior change.Test plan
uv sync --extra dev --extra studioresolves cleanly from the committed lockfileuv run pyright→ 0 errorsuv run ruff check . && uv run ruff format --check .passuv run pytest tests/test_exposure/test_queues.py→ 6 passed