Skip to content

Commit fe52c8e

Browse files
reformat
1 parent a504b10 commit fe52c8e

51 files changed

Lines changed: 118 additions & 6385 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/typespec-python/test/azure/generated/client-naming-enum-conflict/apiview-properties.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"CrossLanguagePackageId": "Client.Naming.EnumConflict",
33
"CrossLanguageDefinitionId": {
4-
"client.naming.enumconflict.firstnamespace.models.FirstModel": "Client.Naming.EnumConflict.FirstNamespace.FirstModel",
5-
"client.naming.enumconflict.secondnamespace.models.SecondModel": "Client.Naming.EnumConflict.SecondNamespace.SecondModel",
4+
"client.naming.enumconflict.models.FirstModel": "Client.Naming.EnumConflict.FirstNamespace.FirstModel",
5+
"client.naming.enumconflict.models.SecondModel": "Client.Naming.EnumConflict.SecondNamespace.SecondModel",
66
"client.naming.enumconflict.models.Status": "Client.Naming.EnumConflict.FirstNamespace.Status",
77
"client.naming.enumconflict.models.SecondStatus": "Client.Naming.EnumConflict.SecondNamespace.Status",
88
"client.naming.enumconflict.operations.FirstOperationsOperations.first": "Client.Naming.EnumConflict.FirstOperations.first",

packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/_utils/model_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# pylint: disable=too-many-lines
1+
# pylint: disable=line-too-long
22
# coding=utf-8
33
# --------------------------------------------------------------------------
44
# Copyright (c) Microsoft Corporation. All rights reserved.

packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/aio/operations/_operations.py

Lines changed: 28 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# pylint: disable=line-too-long,useless-suppression
12
# coding=utf-8
23
# --------------------------------------------------------------------------
34
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -26,11 +27,10 @@
2627
from azure.core.tracing.decorator_async import distributed_trace_async
2728
from azure.core.utils import case_insensitive_dict
2829

30+
from ... import models as _models
2931
from ..._utils.model_base import SdkJSONEncoder, _deserialize
3032
from ..._utils.serialization import Deserializer, Serializer
31-
from ...firstnamespace import models as _firstnamespace_models3
3233
from ...operations._operations import build_first_operations_first_request, build_second_operations_second_request
33-
from ...secondnamespace import models as _secondnamespace_models3
3434
from .._configuration import EnumConflictClientConfiguration
3535

3636
JSON = MutableMapping[str, Any]
@@ -57,24 +57,22 @@ def __init__(self, *args, **kwargs) -> None:
5757

5858
@overload
5959
async def first(
60-
self, body: _firstnamespace_models3.FirstModel, *, content_type: str = "application/json", **kwargs: Any
61-
) -> _firstnamespace_models3.FirstModel:
60+
self, body: _models.FirstModel, *, content_type: str = "application/json", **kwargs: Any
61+
) -> _models.FirstModel:
6262
"""Operation using first namespace Status enum.
6363
6464
:param body: Required.
65-
:type body: ~client.naming.enumconflict.firstnamespace.models.FirstModel
65+
:type body: ~client.naming.enumconflict.models.FirstModel
6666
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
6767
Default value is "application/json".
6868
:paramtype content_type: str
6969
:return: FirstModel. The FirstModel is compatible with MutableMapping
70-
:rtype: ~client.naming.enumconflict.firstnamespace.models.FirstModel
70+
:rtype: ~client.naming.enumconflict.models.FirstModel
7171
:raises ~azure.core.exceptions.HttpResponseError:
7272
"""
7373

7474
@overload
75-
async def first(
76-
self, body: JSON, *, content_type: str = "application/json", **kwargs: Any
77-
) -> _firstnamespace_models3.FirstModel:
75+
async def first(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> _models.FirstModel:
7876
"""Operation using first namespace Status enum.
7977
8078
:param body: Required.
@@ -83,14 +81,14 @@ async def first(
8381
Default value is "application/json".
8482
:paramtype content_type: str
8583
:return: FirstModel. The FirstModel is compatible with MutableMapping
86-
:rtype: ~client.naming.enumconflict.firstnamespace.models.FirstModel
84+
:rtype: ~client.naming.enumconflict.models.FirstModel
8785
:raises ~azure.core.exceptions.HttpResponseError:
8886
"""
8987

9088
@overload
9189
async def first(
9290
self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
93-
) -> _firstnamespace_models3.FirstModel:
91+
) -> _models.FirstModel:
9492
"""Operation using first namespace Status enum.
9593
9694
:param body: Required.
@@ -99,20 +97,18 @@ async def first(
9997
Default value is "application/json".
10098
:paramtype content_type: str
10199
:return: FirstModel. The FirstModel is compatible with MutableMapping
102-
:rtype: ~client.naming.enumconflict.firstnamespace.models.FirstModel
100+
:rtype: ~client.naming.enumconflict.models.FirstModel
103101
:raises ~azure.core.exceptions.HttpResponseError:
104102
"""
105103

106104
@distributed_trace_async
107-
async def first(
108-
self, body: Union[_firstnamespace_models3.FirstModel, JSON, IO[bytes]], **kwargs: Any
109-
) -> _firstnamespace_models3.FirstModel:
105+
async def first(self, body: Union[_models.FirstModel, JSON, IO[bytes]], **kwargs: Any) -> _models.FirstModel:
110106
"""Operation using first namespace Status enum.
111107
112108
:param body: Is one of the following types: FirstModel, JSON, IO[bytes] Required.
113-
:type body: ~client.naming.enumconflict.firstnamespace.models.FirstModel or JSON or IO[bytes]
109+
:type body: ~client.naming.enumconflict.models.FirstModel or JSON or IO[bytes]
114110
:return: FirstModel. The FirstModel is compatible with MutableMapping
115-
:rtype: ~client.naming.enumconflict.firstnamespace.models.FirstModel
111+
:rtype: ~client.naming.enumconflict.models.FirstModel
116112
:raises ~azure.core.exceptions.HttpResponseError:
117113
"""
118114
error_map: MutableMapping = {
@@ -127,7 +123,7 @@ async def first(
127123
_params = kwargs.pop("params", {}) or {}
128124

129125
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
130-
cls: ClsType[_firstnamespace_models3.FirstModel] = kwargs.pop("cls", None)
126+
cls: ClsType[_models.FirstModel] = kwargs.pop("cls", None)
131127

132128
content_type = content_type or "application/json"
133129
_content = None
@@ -166,7 +162,7 @@ async def first(
166162
if _stream:
167163
deserialized = response.iter_bytes()
168164
else:
169-
deserialized = _deserialize(_firstnamespace_models3.FirstModel, response.json())
165+
deserialized = _deserialize(_models.FirstModel, response.json())
170166

171167
if cls:
172168
return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -193,24 +189,22 @@ def __init__(self, *args, **kwargs) -> None:
193189

194190
@overload
195191
async def second(
196-
self, body: _secondnamespace_models3.SecondModel, *, content_type: str = "application/json", **kwargs: Any
197-
) -> _secondnamespace_models3.SecondModel:
192+
self, body: _models.SecondModel, *, content_type: str = "application/json", **kwargs: Any
193+
) -> _models.SecondModel:
198194
"""Operation using second namespace Status enum.
199195
200196
:param body: Required.
201-
:type body: ~client.naming.enumconflict.secondnamespace.models.SecondModel
197+
:type body: ~client.naming.enumconflict.models.SecondModel
202198
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
203199
Default value is "application/json".
204200
:paramtype content_type: str
205201
:return: SecondModel. The SecondModel is compatible with MutableMapping
206-
:rtype: ~client.naming.enumconflict.secondnamespace.models.SecondModel
202+
:rtype: ~client.naming.enumconflict.models.SecondModel
207203
:raises ~azure.core.exceptions.HttpResponseError:
208204
"""
209205

210206
@overload
211-
async def second(
212-
self, body: JSON, *, content_type: str = "application/json", **kwargs: Any
213-
) -> _secondnamespace_models3.SecondModel:
207+
async def second(self, body: JSON, *, content_type: str = "application/json", **kwargs: Any) -> _models.SecondModel:
214208
"""Operation using second namespace Status enum.
215209
216210
:param body: Required.
@@ -219,14 +213,14 @@ async def second(
219213
Default value is "application/json".
220214
:paramtype content_type: str
221215
:return: SecondModel. The SecondModel is compatible with MutableMapping
222-
:rtype: ~client.naming.enumconflict.secondnamespace.models.SecondModel
216+
:rtype: ~client.naming.enumconflict.models.SecondModel
223217
:raises ~azure.core.exceptions.HttpResponseError:
224218
"""
225219

226220
@overload
227221
async def second(
228222
self, body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any
229-
) -> _secondnamespace_models3.SecondModel:
223+
) -> _models.SecondModel:
230224
"""Operation using second namespace Status enum.
231225
232226
:param body: Required.
@@ -235,20 +229,18 @@ async def second(
235229
Default value is "application/json".
236230
:paramtype content_type: str
237231
:return: SecondModel. The SecondModel is compatible with MutableMapping
238-
:rtype: ~client.naming.enumconflict.secondnamespace.models.SecondModel
232+
:rtype: ~client.naming.enumconflict.models.SecondModel
239233
:raises ~azure.core.exceptions.HttpResponseError:
240234
"""
241235

242236
@distributed_trace_async
243-
async def second(
244-
self, body: Union[_secondnamespace_models3.SecondModel, JSON, IO[bytes]], **kwargs: Any
245-
) -> _secondnamespace_models3.SecondModel:
237+
async def second(self, body: Union[_models.SecondModel, JSON, IO[bytes]], **kwargs: Any) -> _models.SecondModel:
246238
"""Operation using second namespace Status enum.
247239
248240
:param body: Is one of the following types: SecondModel, JSON, IO[bytes] Required.
249-
:type body: ~client.naming.enumconflict.secondnamespace.models.SecondModel or JSON or IO[bytes]
241+
:type body: ~client.naming.enumconflict.models.SecondModel or JSON or IO[bytes]
250242
:return: SecondModel. The SecondModel is compatible with MutableMapping
251-
:rtype: ~client.naming.enumconflict.secondnamespace.models.SecondModel
243+
:rtype: ~client.naming.enumconflict.models.SecondModel
252244
:raises ~azure.core.exceptions.HttpResponseError:
253245
"""
254246
error_map: MutableMapping = {
@@ -263,7 +255,7 @@ async def second(
263255
_params = kwargs.pop("params", {}) or {}
264256

265257
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
266-
cls: ClsType[_secondnamespace_models3.SecondModel] = kwargs.pop("cls", None)
258+
cls: ClsType[_models.SecondModel] = kwargs.pop("cls", None)
267259

268260
content_type = content_type or "application/json"
269261
_content = None
@@ -302,7 +294,7 @@ async def second(
302294
if _stream:
303295
deserialized = response.iter_bytes()
304296
else:
305-
deserialized = _deserialize(_secondnamespace_models3.SecondModel, response.json())
297+
deserialized = _deserialize(_models.SecondModel, response.json())
306298

307299
if cls:
308300
return cls(pipeline_response, deserialized, {}) # type: ignore

packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/firstnamespace/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/firstnamespace/models/__init__.py

Lines changed: 0 additions & 32 deletions
This file was deleted.

packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/firstnamespace/models/_enums.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/firstnamespace/models/_models.py

Lines changed: 0 additions & 48 deletions
This file was deleted.

packages/typespec-python/test/azure/generated/client-naming-enum-conflict/client/naming/enumconflict/firstnamespace/models/_patch.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)