Skip to content

Commit 16f70ab

Browse files
authored
Fix docstring type for multi namespaces (#3074)
* Update dependencies (2025-04-16 07:31:43) * Regenerate for typespec-python (2025-04-16 07:36:12) * bump dep --------- Co-authored-by: AutoPrFromHttpClientPython <AutoPrFromHttpClientPython>
1 parent c2e1117 commit 16f70ab

File tree

28 files changed

+292
-286
lines changed

28 files changed

+292
-286
lines changed

packages/autorest.python/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"homepage": "https://github.com/Azure/autorest.python/blob/main/README.md",
3131
"dependencies": {
32-
"@typespec/http-client-python": "~0.9.3-dev.1",
32+
"@typespec/http-client-python": "~0.9.3-dev.2",
3333
"@autorest/system-requirements": "~1.0.2",
3434
"fs-extra": "~11.2.0",
3535
"tsx": "~4.19.1"

packages/typespec-python/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"js-yaml": "~4.1.0",
6565
"semver": "~7.6.2",
6666
"tsx": "~4.19.1",
67-
"@typespec/http-client-python": "~0.9.3-dev.1",
67+
"@typespec/http-client-python": "~0.9.3-dev.2",
6868
"fs-extra": "~11.2.0"
6969
},
7070
"devDependencies": {

packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/_operations/_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def get_first(self, **kwargs: Any) -> _first_models2.FirstClientResult:
5656
"""get_first.
5757
5858
:return: FirstClientResult. The FirstClientResult is compatible with MutableMapping
59-
:rtype: ~client.clientnamespace.models.FirstClientResult
59+
:rtype: ~client.clientnamespace.first.models.FirstClientResult
6060
:raises ~azure.core.exceptions.HttpResponseError:
6161
"""
6262
error_map: MutableMapping = {

packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/aio/_operations/_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async def get_first(self, **kwargs: Any) -> _first_models3.FirstClientResult:
3939
"""get_first.
4040
4141
:return: FirstClientResult. The FirstClientResult is compatible with MutableMapping
42-
:rtype: ~client.clientnamespace.models.FirstClientResult
42+
:rtype: ~client.clientnamespace.first.models.FirstClientResult
4343
:raises ~azure.core.exceptions.HttpResponseError:
4444
"""
4545
error_map: MutableMapping = {

packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/_operations/_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def get_second(self, **kwargs: Any) -> _models1.SecondClientResult:
5656
"""get_second.
5757
5858
:return: SecondClientResult. The SecondClientResult is compatible with MutableMapping
59-
:rtype: ~client.clientnamespace.models.SecondClientResult
59+
:rtype: ~client.clientnamespace.second.models.SecondClientResult
6060
:raises ~azure.core.exceptions.HttpResponseError:
6161
"""
6262
error_map: MutableMapping = {

packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/aio/_operations/_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async def get_second(self, **kwargs: Any) -> _models2.SecondClientResult:
3939
"""get_second.
4040
4141
:return: SecondClientResult. The SecondClientResult is compatible with MutableMapping
42-
:rtype: ~client.clientnamespace.models.SecondClientResult
42+
:rtype: ~client.clientnamespace.second.models.SecondClientResult
4343
:raises ~azure.core.exceptions.HttpResponseError:
4444
"""
4545
error_map: MutableMapping = {

packages/typespec-python/test/azure/generated/client-namespace/client/clientnamespace/second/models/_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class SecondClientResult(_model_base.Model):
2020
"""SecondClientResult.
2121
2222
:ivar type: Required. "second"
23-
:vartype type: str or ~client.clientnamespace.models.SecondClientEnumType
23+
:vartype type: str or ~client.clientnamespace.second.sub.models.SecondClientEnumType
2424
"""
2525

2626
type: Union[str, "_sub_models2.SecondClientEnumType"] = rest_field(

packages/typespec-python/test/unbranded/generated/encode-duration/encode/duration/property/aio/operations/_operations.py

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ async def default(
6161
"""default.
6262
6363
:param body: Required.
64-
:type body: ~encode.duration.models.DefaultDurationProperty
64+
:type body: ~encode.duration.property.models.DefaultDurationProperty
6565
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
6666
Default value is "application/json".
6767
:paramtype content_type: str
6868
:return: DefaultDurationProperty. The DefaultDurationProperty is compatible with MutableMapping
69-
:rtype: ~encode.duration.models.DefaultDurationProperty
69+
:rtype: ~encode.duration.property.models.DefaultDurationProperty
7070
:raises ~corehttp.exceptions.HttpResponseError:
7171
"""
7272

@@ -82,7 +82,7 @@ async def default(
8282
Default value is "application/json".
8383
:paramtype content_type: str
8484
:return: DefaultDurationProperty. The DefaultDurationProperty is compatible with MutableMapping
85-
:rtype: ~encode.duration.models.DefaultDurationProperty
85+
:rtype: ~encode.duration.property.models.DefaultDurationProperty
8686
:raises ~corehttp.exceptions.HttpResponseError:
8787
"""
8888

@@ -98,7 +98,7 @@ async def default(
9898
Default value is "application/json".
9999
:paramtype content_type: str
100100
:return: DefaultDurationProperty. The DefaultDurationProperty is compatible with MutableMapping
101-
:rtype: ~encode.duration.models.DefaultDurationProperty
101+
:rtype: ~encode.duration.property.models.DefaultDurationProperty
102102
:raises ~corehttp.exceptions.HttpResponseError:
103103
"""
104104

@@ -108,9 +108,9 @@ async def default(
108108
"""default.
109109
110110
:param body: Is one of the following types: DefaultDurationProperty, JSON, IO[bytes] Required.
111-
:type body: ~encode.duration.models.DefaultDurationProperty or JSON or IO[bytes]
111+
:type body: ~encode.duration.property.models.DefaultDurationProperty or JSON or IO[bytes]
112112
:return: DefaultDurationProperty. The DefaultDurationProperty is compatible with MutableMapping
113-
:rtype: ~encode.duration.models.DefaultDurationProperty
113+
:rtype: ~encode.duration.property.models.DefaultDurationProperty
114114
:raises ~corehttp.exceptions.HttpResponseError:
115115
"""
116116
error_map: MutableMapping = {
@@ -176,12 +176,12 @@ async def iso8601(
176176
"""iso8601.
177177
178178
:param body: Required.
179-
:type body: ~encode.duration.models.ISO8601DurationProperty
179+
:type body: ~encode.duration.property.models.ISO8601DurationProperty
180180
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
181181
Default value is "application/json".
182182
:paramtype content_type: str
183183
:return: ISO8601DurationProperty. The ISO8601DurationProperty is compatible with MutableMapping
184-
:rtype: ~encode.duration.models.ISO8601DurationProperty
184+
:rtype: ~encode.duration.property.models.ISO8601DurationProperty
185185
:raises ~corehttp.exceptions.HttpResponseError:
186186
"""
187187

@@ -197,7 +197,7 @@ async def iso8601(
197197
Default value is "application/json".
198198
:paramtype content_type: str
199199
:return: ISO8601DurationProperty. The ISO8601DurationProperty is compatible with MutableMapping
200-
:rtype: ~encode.duration.models.ISO8601DurationProperty
200+
:rtype: ~encode.duration.property.models.ISO8601DurationProperty
201201
:raises ~corehttp.exceptions.HttpResponseError:
202202
"""
203203

@@ -213,7 +213,7 @@ async def iso8601(
213213
Default value is "application/json".
214214
:paramtype content_type: str
215215
:return: ISO8601DurationProperty. The ISO8601DurationProperty is compatible with MutableMapping
216-
:rtype: ~encode.duration.models.ISO8601DurationProperty
216+
:rtype: ~encode.duration.property.models.ISO8601DurationProperty
217217
:raises ~corehttp.exceptions.HttpResponseError:
218218
"""
219219

@@ -223,9 +223,9 @@ async def iso8601(
223223
"""iso8601.
224224
225225
:param body: Is one of the following types: ISO8601DurationProperty, JSON, IO[bytes] Required.
226-
:type body: ~encode.duration.models.ISO8601DurationProperty or JSON or IO[bytes]
226+
:type body: ~encode.duration.property.models.ISO8601DurationProperty or JSON or IO[bytes]
227227
:return: ISO8601DurationProperty. The ISO8601DurationProperty is compatible with MutableMapping
228-
:rtype: ~encode.duration.models.ISO8601DurationProperty
228+
:rtype: ~encode.duration.property.models.ISO8601DurationProperty
229229
:raises ~corehttp.exceptions.HttpResponseError:
230230
"""
231231
error_map: MutableMapping = {
@@ -291,13 +291,13 @@ async def int32_seconds(
291291
"""int32_seconds.
292292
293293
:param body: Required.
294-
:type body: ~encode.duration.models.Int32SecondsDurationProperty
294+
:type body: ~encode.duration.property.models.Int32SecondsDurationProperty
295295
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
296296
Default value is "application/json".
297297
:paramtype content_type: str
298298
:return: Int32SecondsDurationProperty. The Int32SecondsDurationProperty is compatible with
299299
MutableMapping
300-
:rtype: ~encode.duration.models.Int32SecondsDurationProperty
300+
:rtype: ~encode.duration.property.models.Int32SecondsDurationProperty
301301
:raises ~corehttp.exceptions.HttpResponseError:
302302
"""
303303

@@ -314,7 +314,7 @@ async def int32_seconds(
314314
:paramtype content_type: str
315315
:return: Int32SecondsDurationProperty. The Int32SecondsDurationProperty is compatible with
316316
MutableMapping
317-
:rtype: ~encode.duration.models.Int32SecondsDurationProperty
317+
:rtype: ~encode.duration.property.models.Int32SecondsDurationProperty
318318
:raises ~corehttp.exceptions.HttpResponseError:
319319
"""
320320

@@ -331,7 +331,7 @@ async def int32_seconds(
331331
:paramtype content_type: str
332332
:return: Int32SecondsDurationProperty. The Int32SecondsDurationProperty is compatible with
333333
MutableMapping
334-
:rtype: ~encode.duration.models.Int32SecondsDurationProperty
334+
:rtype: ~encode.duration.property.models.Int32SecondsDurationProperty
335335
:raises ~corehttp.exceptions.HttpResponseError:
336336
"""
337337

@@ -342,10 +342,10 @@ async def int32_seconds(
342342
343343
:param body: Is one of the following types: Int32SecondsDurationProperty, JSON, IO[bytes]
344344
Required.
345-
:type body: ~encode.duration.models.Int32SecondsDurationProperty or JSON or IO[bytes]
345+
:type body: ~encode.duration.property.models.Int32SecondsDurationProperty or JSON or IO[bytes]
346346
:return: Int32SecondsDurationProperty. The Int32SecondsDurationProperty is compatible with
347347
MutableMapping
348-
:rtype: ~encode.duration.models.Int32SecondsDurationProperty
348+
:rtype: ~encode.duration.property.models.Int32SecondsDurationProperty
349349
:raises ~corehttp.exceptions.HttpResponseError:
350350
"""
351351
error_map: MutableMapping = {
@@ -411,13 +411,13 @@ async def float_seconds(
411411
"""float_seconds.
412412
413413
:param body: Required.
414-
:type body: ~encode.duration.models.FloatSecondsDurationProperty
414+
:type body: ~encode.duration.property.models.FloatSecondsDurationProperty
415415
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
416416
Default value is "application/json".
417417
:paramtype content_type: str
418418
:return: FloatSecondsDurationProperty. The FloatSecondsDurationProperty is compatible with
419419
MutableMapping
420-
:rtype: ~encode.duration.models.FloatSecondsDurationProperty
420+
:rtype: ~encode.duration.property.models.FloatSecondsDurationProperty
421421
:raises ~corehttp.exceptions.HttpResponseError:
422422
"""
423423

@@ -434,7 +434,7 @@ async def float_seconds(
434434
:paramtype content_type: str
435435
:return: FloatSecondsDurationProperty. The FloatSecondsDurationProperty is compatible with
436436
MutableMapping
437-
:rtype: ~encode.duration.models.FloatSecondsDurationProperty
437+
:rtype: ~encode.duration.property.models.FloatSecondsDurationProperty
438438
:raises ~corehttp.exceptions.HttpResponseError:
439439
"""
440440

@@ -451,7 +451,7 @@ async def float_seconds(
451451
:paramtype content_type: str
452452
:return: FloatSecondsDurationProperty. The FloatSecondsDurationProperty is compatible with
453453
MutableMapping
454-
:rtype: ~encode.duration.models.FloatSecondsDurationProperty
454+
:rtype: ~encode.duration.property.models.FloatSecondsDurationProperty
455455
:raises ~corehttp.exceptions.HttpResponseError:
456456
"""
457457

@@ -462,10 +462,10 @@ async def float_seconds(
462462
463463
:param body: Is one of the following types: FloatSecondsDurationProperty, JSON, IO[bytes]
464464
Required.
465-
:type body: ~encode.duration.models.FloatSecondsDurationProperty or JSON or IO[bytes]
465+
:type body: ~encode.duration.property.models.FloatSecondsDurationProperty or JSON or IO[bytes]
466466
:return: FloatSecondsDurationProperty. The FloatSecondsDurationProperty is compatible with
467467
MutableMapping
468-
:rtype: ~encode.duration.models.FloatSecondsDurationProperty
468+
:rtype: ~encode.duration.property.models.FloatSecondsDurationProperty
469469
:raises ~corehttp.exceptions.HttpResponseError:
470470
"""
471471
error_map: MutableMapping = {
@@ -531,13 +531,13 @@ async def float64_seconds(
531531
"""float64_seconds.
532532
533533
:param body: Required.
534-
:type body: ~encode.duration.models.Float64SecondsDurationProperty
534+
:type body: ~encode.duration.property.models.Float64SecondsDurationProperty
535535
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
536536
Default value is "application/json".
537537
:paramtype content_type: str
538538
:return: Float64SecondsDurationProperty. The Float64SecondsDurationProperty is compatible with
539539
MutableMapping
540-
:rtype: ~encode.duration.models.Float64SecondsDurationProperty
540+
:rtype: ~encode.duration.property.models.Float64SecondsDurationProperty
541541
:raises ~corehttp.exceptions.HttpResponseError:
542542
"""
543543

@@ -554,7 +554,7 @@ async def float64_seconds(
554554
:paramtype content_type: str
555555
:return: Float64SecondsDurationProperty. The Float64SecondsDurationProperty is compatible with
556556
MutableMapping
557-
:rtype: ~encode.duration.models.Float64SecondsDurationProperty
557+
:rtype: ~encode.duration.property.models.Float64SecondsDurationProperty
558558
:raises ~corehttp.exceptions.HttpResponseError:
559559
"""
560560

@@ -571,7 +571,7 @@ async def float64_seconds(
571571
:paramtype content_type: str
572572
:return: Float64SecondsDurationProperty. The Float64SecondsDurationProperty is compatible with
573573
MutableMapping
574-
:rtype: ~encode.duration.models.Float64SecondsDurationProperty
574+
:rtype: ~encode.duration.property.models.Float64SecondsDurationProperty
575575
:raises ~corehttp.exceptions.HttpResponseError:
576576
"""
577577

@@ -582,10 +582,11 @@ async def float64_seconds(
582582
583583
:param body: Is one of the following types: Float64SecondsDurationProperty, JSON, IO[bytes]
584584
Required.
585-
:type body: ~encode.duration.models.Float64SecondsDurationProperty or JSON or IO[bytes]
585+
:type body: ~encode.duration.property.models.Float64SecondsDurationProperty or JSON or
586+
IO[bytes]
586587
:return: Float64SecondsDurationProperty. The Float64SecondsDurationProperty is compatible with
587588
MutableMapping
588-
:rtype: ~encode.duration.models.Float64SecondsDurationProperty
589+
:rtype: ~encode.duration.property.models.Float64SecondsDurationProperty
589590
:raises ~corehttp.exceptions.HttpResponseError:
590591
"""
591592
error_map: MutableMapping = {
@@ -651,13 +652,13 @@ async def float_seconds_array(
651652
"""float_seconds_array.
652653
653654
:param body: Required.
654-
:type body: ~encode.duration.models.FloatSecondsDurationArrayProperty
655+
:type body: ~encode.duration.property.models.FloatSecondsDurationArrayProperty
655656
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
656657
Default value is "application/json".
657658
:paramtype content_type: str
658659
:return: FloatSecondsDurationArrayProperty. The FloatSecondsDurationArrayProperty is compatible
659660
with MutableMapping
660-
:rtype: ~encode.duration.models.FloatSecondsDurationArrayProperty
661+
:rtype: ~encode.duration.property.models.FloatSecondsDurationArrayProperty
661662
:raises ~corehttp.exceptions.HttpResponseError:
662663
"""
663664

@@ -674,7 +675,7 @@ async def float_seconds_array(
674675
:paramtype content_type: str
675676
:return: FloatSecondsDurationArrayProperty. The FloatSecondsDurationArrayProperty is compatible
676677
with MutableMapping
677-
:rtype: ~encode.duration.models.FloatSecondsDurationArrayProperty
678+
:rtype: ~encode.duration.property.models.FloatSecondsDurationArrayProperty
678679
:raises ~corehttp.exceptions.HttpResponseError:
679680
"""
680681

@@ -691,7 +692,7 @@ async def float_seconds_array(
691692
:paramtype content_type: str
692693
:return: FloatSecondsDurationArrayProperty. The FloatSecondsDurationArrayProperty is compatible
693694
with MutableMapping
694-
:rtype: ~encode.duration.models.FloatSecondsDurationArrayProperty
695+
:rtype: ~encode.duration.property.models.FloatSecondsDurationArrayProperty
695696
:raises ~corehttp.exceptions.HttpResponseError:
696697
"""
697698

@@ -702,10 +703,11 @@ async def float_seconds_array(
702703
703704
:param body: Is one of the following types: FloatSecondsDurationArrayProperty, JSON, IO[bytes]
704705
Required.
705-
:type body: ~encode.duration.models.FloatSecondsDurationArrayProperty or JSON or IO[bytes]
706+
:type body: ~encode.duration.property.models.FloatSecondsDurationArrayProperty or JSON or
707+
IO[bytes]
706708
:return: FloatSecondsDurationArrayProperty. The FloatSecondsDurationArrayProperty is compatible
707709
with MutableMapping
708-
:rtype: ~encode.duration.models.FloatSecondsDurationArrayProperty
710+
:rtype: ~encode.duration.property.models.FloatSecondsDurationArrayProperty
709711
:raises ~corehttp.exceptions.HttpResponseError:
710712
"""
711713
error_map: MutableMapping = {

0 commit comments

Comments
 (0)