Restore mypy and fix the hints #245
Merged
Gsantomaggio merged 3 commits intomasterfrom Sep 23, 2025
Merged
Conversation
Signed-off-by: Gabriele Santomaggio <[email protected]>
Signed-off-by: Gabriele Santomaggio <[email protected]>
Signed-off-by: Gabriele Santomaggio <[email protected]>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR restores mypy type checking and fixes various type annotation issues throughout the codebase to ensure proper type safety. The changes address union syntax, optional parameter defaults, abstract method decorators, and import type annotations.
- Updates union syntax from
|toUnionfor better compatibility - Adds missing
@abc.abstractmethoddecorators to abstract base classes - Fixes default parameter values and type hints for better mypy compliance
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| rstream/superstream_producer.py | Fixed default parameter value and union type annotation |
| rstream/superstream_consumer.py | Fixed default parameter value for connection_name |
| rstream/superstream.py | Added abstract method decorators and renamed parameters |
| rstream/producer.py | Fixed default parameter and added type ignore comment |
| rstream/consumer.py | Fixed default parameter value for connection_name |
| rstream/client.py | Added type ignore and fixed variable naming collision |
| rstream/amqp.py | Added type ignore comments for internal imports |
| rstream/init.py | Reorganized imports and fixed license default value |
| docs/examples/super_stream/super_stream_producer_key.py | Added missing import |
| docs/examples/single_active_consumer/single_active_consumer.py | Fixed type annotation and API usage |
| docs/examples/single_active_consumer/sac_super_stream_producer.py | Commented out unused variables |
| docs/examples/reliable_client/BestPracticesClient.py | Added type ignore comments for union types |
| Makefile | Added new makefile with mypy integration |
| .github/workflows/test.yaml | Re-enabled mypy in CI workflow |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
This PR restores mypy type checking and fixes various type annotation issues throughout the codebase to ensure proper type safety. The changes address union syntax, optional parameter defaults, abstract method decorators, and import type annotations.