Skip to content

Restore mypy and fix the hints #245

Merged
Gsantomaggio merged 3 commits intomasterfrom
mypy_checks
Sep 23, 2025
Merged

Restore mypy and fix the hints #245
Gsantomaggio merged 3 commits intomasterfrom
mypy_checks

Conversation

@Gsantomaggio
Copy link
Copy Markdown
Member

@Gsantomaggio Gsantomaggio commented Sep 23, 2025

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 | to Union for better compatibility
  • Adds missing @abc.abstractmethod decorators to abstract base classes
  • Fixes default parameter values and type hints for better mypy compliance

Signed-off-by: Gabriele Santomaggio <[email protected]>
Signed-off-by: Gabriele Santomaggio <[email protected]>
Signed-off-by: Gabriele Santomaggio <[email protected]>
@Gsantomaggio Gsantomaggio marked this pull request as ready for review September 23, 2025 07:02
@Gsantomaggio Gsantomaggio added this to the 0.4.0 milestone Sep 23, 2025
@Gsantomaggio Gsantomaggio added the enhancement New feature or request label Sep 23, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 | to Union for better compatibility
  • Adds missing @abc.abstractmethod decorators 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.

@Gsantomaggio Gsantomaggio merged commit cdbae44 into master Sep 23, 2025
1 check passed
@Gsantomaggio Gsantomaggio deleted the mypy_checks branch September 23, 2025 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants