Skip to content

Commit

Permalink
fix for mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
msyyc committed Oct 18, 2024
1 parent f1bfe9c commit 3540f36
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _get_filename(operation_group: OperationGroup) -> str:
return "_operations" if self.code_model.options["combine_operation_files"] else operation_group.filename

return [
f"from .{_get_filename(og)} import {og.class_name}"
f"from .{_get_filename(og)} import {og.class_name} # type: ignore"
for client in self.clients
for og in client.operation_groups
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{ keywords.path_type_checking_imports() }}
{% if clients %}
{% for client in clients %}
from .{{ client.filename }} import {{ client.name }}
from .{{ client.filename }} import {{ client.name }} # type: ignore
{% endfor %}
{% endif %}
{% if not async_mode and code_model.options['package_version']%}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@
{{ keywords.path_type_checking_imports() }}
{% if schemas %}

from .{{ code_model.models_filename }} import ( # type: ignore
{% for schema in schemas %}
from .{{ code_model.models_filename }} import {{ schema }}
{{ schema }},
{% endfor %}
)
{% endif %}
{% if enums %}

from .{{ code_model.enums_filename }} import ( # type: ignore
{% for enum in enums %}
from .{{ code_model.enums_filename }} import {{ enum }}
{{ enum }},
{% endfor %}
)
{% endif %}
{{ keywords.patch_imports() }}
__all__ = [
Expand Down

0 comments on commit 3540f36

Please sign in to comment.