Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix type hints in faststream/specification #1985

Merged
merged 1 commit into from
Dec 15, 2024

Conversation

IvanKirpichnikov
Copy link
Contributor

Description

Mypy bugs are fixed

Type of change

  • Bug fix (a non-breaking change that resolves an issue)

Checklist

  • My code adheres to the style guidelines of this project (scripts/lint.sh shows no errors)
  • I have conducted a self-review of my own code
  • I have made the necessary changes to the documentation
  • My changes do not generate any new warnings
  • I have added tests to validate the effectiveness of my fix or the functionality of my new feature
  • Both new and existing unit tests pass successfully on my local environment by running scripts/test-cov.sh
  • I have ensured that static analysis tests are passing by running scripts/static-analysis.sh
  • I have included code examples to illustrate the modifications

@@ -1,3 +1,5 @@
from faststream.specification.asyncapi.v2_6_0.schema import ServerVariable
Copy link
Member

Choose a reason for hiding this comment

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

We shouldn't reexport v2_6_0 classes here, please, reexport them in the final file like here: https://github.com/airtai/faststream/blob/0.6.0/faststream/specification/asyncapi/v3_0_0/schema/utils.py

@@ -18,7 +18,7 @@

def parse_handler_params(call: "CallModel", prefix: str = "") -> AnyDict:
"""Parses the handler parameters."""
model = getattr(call, "serializer", call).model
model = getattr(call, "serializer", call).model # type: ignore[union-attr]
Copy link
Member

Choose a reason for hiding this comment

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

It is a FastDepends - related thing. Do not suppress it, let it be an error

@Lancetnik Lancetnik merged commit d1a2376 into airtai:0.6.0 Dec 15, 2024
25 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants