Skip to content

Commit 77ca206

Browse files
committed
Sort lazy imports to increase stability
1 parent f8f9839 commit 77ca206

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openapi_python_client/templates/model.py.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ from ..types import UNSET, Unset
1616
{{ relative }}
1717
{% endfor %}
1818

19-
{% for lazy_import in model.lazy_imports %}
19+
{% for lazy_import in model.lazy_imports | sort %}
2020
{% if loop.first %}
2121
if TYPE_CHECKING:
2222
{% endif %}
@@ -173,7 +173,7 @@ return field_dict
173173

174174
@classmethod
175175
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
176-
{% for lazy_import in model.lazy_imports %}
176+
{% for lazy_import in model.lazy_imports | sort %}
177177
{{ lazy_import }}
178178
{% endfor %}
179179
{% if (model.required_properties or model.optional_properties or model.additional_properties) %}

0 commit comments

Comments
 (0)