Conversation
Pyright flagged int(headers.get("subscription")) since .get() can
return None. Subscription is always present on incoming stomp
messages, so use direct indexing instead.
The classes internally are set up to allow empty or null transport, which we almost never want to actually use. Use this property as a way of retrieving the concrete transport (or failing) rather than handling None logic everywhere that we don't need it
Annotate Recipe, RecipeWrapper, CommonTransport, common_service, transport middleware (incl. OTEL), pika/stomp/offline transports, frontend, contrib, services, and util/zocalo modules. Also includes related minor refactors required by typing: elevate kwargs to explicit parameters where appropriate; make CommonService.transport raise if unset; route the cls.recipe override correctly in Recipe.__init__; forward log_extender in recipe.wrap_subscribe; type-annotate validate_recipe and the offline/middleware classes; tighten test signature expectations to match the new exact send() signature.
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.
Most of the public API was done manually (for public base classes). Claude was used to extrapolate these to the downstream implementations of that base class, and for some of the less important internal details (e.g. the stuff in contrib, example services).
Docstrings have been reformatted to Google-Style. Some of them have been rewritten/enhanced, especially in the RecipeWrapper systems.