@typespec/http-client-python 0.9.3-dev.1 → 0.9.3-dev.2

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.
@@ -52,7 +52,7 @@ class EnumValue(BaseType):
52
52
  """The python type used for RST syntax input and type annotation."""
53
53
 
54
54
  type_annotation = self.value_type.type_annotation(**kwargs)
55
- enum_type_annotation = f"{self.code_model.namespace}.models.{self.name}"
55
+ enum_type_annotation = f"{self.enum_type.client_namespace}.models.{self.name}"
56
56
  return f"{type_annotation} or ~{enum_type_annotation}"
57
57
 
58
58
  def get_json_template_representation(
@@ -198,7 +198,7 @@ class EnumType(BaseType):
198
198
  """The python type used for RST syntax input and type annotation."""
199
199
  if self.code_model.options["models_mode"]:
200
200
  type_annotation = self.value_type.type_annotation(**kwargs)
201
- enum_type_annotation = f"{self.code_model.namespace}.models.{self.name}"
201
+ enum_type_annotation = f"{self.client_namespace}.models.{self.name}"
202
202
  return f"{type_annotation} or ~{enum_type_annotation}"
203
203
  return self.value_type.type_annotation(**kwargs)
204
204
 
@@ -292,7 +292,7 @@ class GeneratedModelType(ModelType):
292
292
 
293
293
  def docstring_type(self, **kwargs: Any) -> str:
294
294
  type_annotation = self.type_annotation(need_model_alias=False, skip_quote=True, **kwargs)
295
- return f"~{self.code_model.namespace}.models.{type_annotation}"
295
+ return f"~{self.client_namespace}.models.{type_annotation}"
296
296
 
297
297
  def docstring_text(self, **kwargs: Any) -> str:
298
298
  return self.name
@@ -52,7 +52,7 @@ class EnumValue(BaseType):
52
52
  """The python type used for RST syntax input and type annotation."""
53
53
 
54
54
  type_annotation = self.value_type.type_annotation(**kwargs)
55
- enum_type_annotation = f"{self.code_model.namespace}.models.{self.name}"
55
+ enum_type_annotation = f"{self.enum_type.client_namespace}.models.{self.name}"
56
56
  return f"{type_annotation} or ~{enum_type_annotation}"
57
57
 
58
58
  def get_json_template_representation(
@@ -198,7 +198,7 @@ class EnumType(BaseType):
198
198
  """The python type used for RST syntax input and type annotation."""
199
199
  if self.code_model.options["models_mode"]:
200
200
  type_annotation = self.value_type.type_annotation(**kwargs)
201
- enum_type_annotation = f"{self.code_model.namespace}.models.{self.name}"
201
+ enum_type_annotation = f"{self.client_namespace}.models.{self.name}"
202
202
  return f"{type_annotation} or ~{enum_type_annotation}"
203
203
  return self.value_type.type_annotation(**kwargs)
204
204
 
@@ -292,7 +292,7 @@ class GeneratedModelType(ModelType):
292
292
 
293
293
  def docstring_type(self, **kwargs: Any) -> str:
294
294
  type_annotation = self.type_annotation(need_model_alias=False, skip_quote=True, **kwargs)
295
- return f"~{self.code_model.namespace}.models.{type_annotation}"
295
+ return f"~{self.client_namespace}.models.{type_annotation}"
296
296
 
297
297
  def docstring_text(self, **kwargs: Any) -> str:
298
298
  return self.name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typespec/http-client-python",
3
- "version": "0.9.3-dev.1",
3
+ "version": "0.9.3-dev.2",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec emitter for Python SDKs",
6
6
  "homepage": "https://typespec.io",