@typespec/http-client-python 0.6.0 → 0.6.1

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.
@@ -155,7 +155,7 @@ class TokenCredentialType(CredentialType[Union[BearerTokenCredentialPolicyType,
155
155
 
156
156
  @property
157
157
  def type_description(self) -> str:
158
- return "TokenCredential"
158
+ return "token credential"
159
159
 
160
160
  @property
161
161
  def credentials_subfolder(self) -> str:
@@ -116,7 +116,7 @@ class _ModelSerializer(BaseSerializer, ABC):
116
116
  def initialize_properties(self, model: ModelType) -> List[str]: ...
117
117
 
118
118
  def need_init(self, model: ModelType) -> bool:
119
- return (not model.internal) and bool(self.init_line(model) or model.discriminator)
119
+ return bool(self.init_line(model) or model.discriminator)
120
120
 
121
121
  def pylint_disable_items(self, model: ModelType) -> List[str]:
122
122
  if model.flattened_property or self.initialize_properties(model):
@@ -123,9 +123,9 @@
123
123
  "implementation_version": "3.8.10",
124
124
  "os_name": "posix",
125
125
  "platform_machine": "x86_64",
126
- "platform_release": "5.15.0-1075-azure",
126
+ "platform_release": "5.15.0-1078-azure",
127
127
  "platform_system": "Linux",
128
- "platform_version": "#84~20.04.1-Ubuntu SMP Mon Nov 4 18:58:41 UTC 2024",
128
+ "platform_version": "#87~20.04.1-Ubuntu SMP Wed Dec 18 20:14:54 UTC 2024",
129
129
  "python_full_version": "3.8.10",
130
130
  "platform_python_implementation": "CPython",
131
131
  "python_version": "3.8",
@@ -155,7 +155,7 @@ class TokenCredentialType(CredentialType[Union[BearerTokenCredentialPolicyType,
155
155
 
156
156
  @property
157
157
  def type_description(self) -> str:
158
- return "TokenCredential"
158
+ return "token credential"
159
159
 
160
160
  @property
161
161
  def credentials_subfolder(self) -> str:
@@ -116,7 +116,7 @@ class _ModelSerializer(BaseSerializer, ABC):
116
116
  def initialize_properties(self, model: ModelType) -> List[str]: ...
117
117
 
118
118
  def need_init(self, model: ModelType) -> bool:
119
- return (not model.internal) and bool(self.init_line(model) or model.discriminator)
119
+ return bool(self.init_line(model) or model.discriminator)
120
120
 
121
121
  def pylint_disable_items(self, model: ModelType) -> List[str]:
122
122
  if model.flattened_property or self.initialize_properties(model):
@@ -92,7 +92,7 @@ async def test_operation(client: AccessClient):
92
92
  @pytest.mark.asyncio
93
93
  async def test_discriminator(client: AccessClient):
94
94
  result = await client.relative_model_in_operation._discriminator(kind="real")
95
- assert result == models._models.RealModel(name="Madge", kind="real")
95
+ assert result == models._models.RealModel(name="Madge")
96
96
 
97
97
  with pytest.raises(ImportError):
98
98
  from specs.azure.clientgenerator.core.access.models import RealModel
@@ -83,7 +83,7 @@ def test_operation(client: AccessClient):
83
83
 
84
84
  def test_discriminator(client: AccessClient):
85
85
  result = client.relative_model_in_operation._discriminator(kind="real")
86
- assert result == models._models.RealModel(name="Madge", kind="real")
86
+ assert result == models._models.RealModel(name="Madge")
87
87
 
88
88
  with pytest.raises(ImportError):
89
89
  from specs.azure.clientgenerator.core.access.models import RealModel
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typespec/http-client-python",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec emitter for Python SDKs",
6
6
  "homepage": "https://typespec.io",