@autorest/python 6.4.10 → 6.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -184,7 +184,10 @@ class CodeModel: # pylint: disable=too-many-public-methods
184
184
  """All of the model types in this class"""
185
185
  if not self._model_types:
186
186
  self._model_types = [
187
- t for t in self.types_map.values() if isinstance(t, ModelType)
187
+ t
188
+ for t in self.types_map.values()
189
+ if isinstance(t, ModelType)
190
+ and not (self.options["models_mode"] == "dpg" and t.page_result_model)
188
191
  ]
189
192
  return self._model_types
190
193
 
@@ -74,6 +74,7 @@ class ModelType( # pylint: disable=abstract-method
74
74
  self._got_polymorphic_subtypes = False
75
75
  self.internal: bool = self.yaml_data.get("internal", False)
76
76
  self.snake_case_name: str = self.yaml_data["snakeCaseName"]
77
+ self.page_result_model: bool = self.yaml_data.get("pageResultModel", False)
77
78
 
78
79
  @property
79
80
  def is_xml(self) -> bool:
@@ -156,7 +156,14 @@ class PagingOperationBase(OperationBase[PagingResponseType]):
156
156
  "azure.core.utils", "case_insensitive_dict", ImportType.AZURECORE
157
157
  )
158
158
  if self.code_model.options["models_mode"] == "dpg":
159
+ relative_path = "..." if async_mode else ".."
159
160
  file_import.merge(self.item_type.imports(**kwargs))
161
+ if self.default_error_deserialization or any(
162
+ r.type for r in self.responses
163
+ ):
164
+ file_import.add_submodule_import(
165
+ f"{relative_path}_model_base", "_deserialize", ImportType.LOCAL
166
+ )
160
167
  return file_import
161
168
 
162
169
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autorest/python",
3
- "version": "6.4.10",
3
+ "version": "6.4.11",
4
4
  "description": "The Python extension for generators in AutoRest.",
5
5
  "main": "index.js",
6
6
  "repository": {