Skip to content

Commit

Permalink
Remove sample from docstring (#2774)
Browse files Browse the repository at this point in the history
  • Loading branch information
msyyc authored Aug 15, 2024
1 parent f365c4b commit 6a25cc3
Show file tree
Hide file tree
Showing 184 changed files with 10 additions and 37,830 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
changeKind: feature
packages:
- "@autorest/python"
- "@azure-tools/typespec-python"
---

Remove samples from docstring of operation
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

from ... import models as _models
from ...operations._operation_group_one_operations import build_test_two_request
from .._vendor import MultiapiServiceClientMixinABC

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

from .. import models as _models
from ..._serialization import Serializer
from .._vendor import MultiapiServiceClientMixinABC

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

from ... import models as _models
from ...operations._operation_group_one_operations import build_test_three_request, build_test_two_request
from .._vendor import MultiapiServiceClientMixinABC

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

from ... import models as _models
from ...operations._operation_group_two_operations import build_test_four_request
from .._vendor import MultiapiServiceClientMixinABC

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

from .. import models as _models
from ..._serialization import Serializer
from .._vendor import MultiapiServiceClientMixinABC

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

from .. import models as _models
from ..._serialization import Serializer
from .._vendor import MultiapiServiceClientMixinABC

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
build_test_operation_group_paging_request,
build_test_two_request,
)
from .._vendor import MultiapiServiceClientMixinABC

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

from ... import models as _models
from ...operations._operation_group_two_operations import build_test_five_request, build_test_four_request
from .._vendor import MultiapiServiceClientMixinABC

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

from .. import models as _models
from ..._serialization import Serializer
from .._vendor import MultiapiServiceClientMixinABC

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

from .. import models as _models
from ..._serialization import Serializer
from .._vendor import MultiapiServiceClientMixinABC

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,9 +535,9 @@ def _json_response_template_name(self) -> str:
return "response"

def example_template(self, builder: OperationType) -> List[str]:
if self.code_model.options["models_mode"] in ("msrest", "dpg"):
return []
retval = super().example_template(builder)
if self.code_model.options["models_mode"] == "msrest":
return retval
for response in builder.responses:
polymorphic_subtypes: List[ModelType] = []
if not response.type:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,6 @@ async def no_decorator_in_public(self, *, name: str, **kwargs: Any) -> _models.N
MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models.NoDecoratorModelInPublic
:raises ~azure.core.exceptions.HttpResponseError:
Example:
.. code-block:: python
# response body for status code(s): 200
response == {
"name": "str"
}
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
Expand Down Expand Up @@ -140,14 +132,6 @@ async def public_decorator_in_public(self, *, name: str, **kwargs: Any) -> _mode
MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models.PublicDecoratorModelInPublic
:raises ~azure.core.exceptions.HttpResponseError:
Example:
.. code-block:: python
# response body for status code(s): 200
response == {
"name": "str"
}
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
Expand Down Expand Up @@ -228,14 +212,6 @@ async def _no_decorator_in_internal( # pylint: disable=protected-access
MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models._models.NoDecoratorModelInInternal
:raises ~azure.core.exceptions.HttpResponseError:
Example:
.. code-block:: python
# response body for status code(s): 200
response == {
"name": "str"
}
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
Expand Down Expand Up @@ -303,14 +279,6 @@ async def _internal_decorator_in_internal( # pylint: disable=protected-access
:rtype:
~specs.azure.clientgenerator.core.access.models._models.InternalDecoratorModelInInternal
:raises ~azure.core.exceptions.HttpResponseError:
Example:
.. code-block:: python
# response body for status code(s): 200
response == {
"name": "str"
}
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
Expand Down Expand Up @@ -377,14 +345,6 @@ async def _public_decorator_in_internal(
MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models.PublicDecoratorModelInInternal
:raises ~azure.core.exceptions.HttpResponseError:
Example:
.. code-block:: python
# response body for status code(s): 200
response == {
"name": "str"
}
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
Expand Down Expand Up @@ -462,14 +422,6 @@ async def public(self, *, name: str, **kwargs: Any) -> _models.SharedModel:
:return: SharedModel. The SharedModel is compatible with MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models.SharedModel
:raises ~azure.core.exceptions.HttpResponseError:
Example:
.. code-block:: python
# response body for status code(s): 200
response == {
"name": "str"
}
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
Expand Down Expand Up @@ -529,14 +481,6 @@ async def _internal(self, *, name: str, **kwargs: Any) -> _models.SharedModel:
:return: SharedModel. The SharedModel is compatible with MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models.SharedModel
:raises ~azure.core.exceptions.HttpResponseError:
Example:
.. code-block:: python
# response body for status code(s): 200
response == {
"name": "str"
}
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
Expand Down Expand Up @@ -627,17 +571,6 @@ async def _operation( # pylint: disable=protected-access
:return: OuterModel. The OuterModel is compatible with MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models._models.OuterModel
:raises ~azure.core.exceptions.HttpResponseError:
Example:
.. code-block:: python
# response body for status code(s): 200
response == {
"inner": {
"name": "str"
},
"name": "str"
}
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
Expand Down Expand Up @@ -707,21 +640,6 @@ async def _discriminator( # pylint: disable=protected-access
:return: AbstractModel. The AbstractModel is compatible with MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models._models.AbstractModel
:raises ~azure.core.exceptions.HttpResponseError:
Example:
.. code-block:: python
# The response is polymorphic. The following are possible polymorphic responses based
off discriminator "kind":
# JSON input template for discriminator value "real":
abstract_model = {
"kind": "real",
"name": "str"
}
# response body for status code(s): 200
response == abstract_model
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,6 @@ def no_decorator_in_public(self, *, name: str, **kwargs: Any) -> _models.NoDecor
MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models.NoDecoratorModelInPublic
:raises ~azure.core.exceptions.HttpResponseError:
Example:
.. code-block:: python
# response body for status code(s): 200
response == {
"name": "str"
}
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
Expand Down Expand Up @@ -314,14 +306,6 @@ def public_decorator_in_public(self, *, name: str, **kwargs: Any) -> _models.Pub
MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models.PublicDecoratorModelInPublic
:raises ~azure.core.exceptions.HttpResponseError:
Example:
.. code-block:: python
# response body for status code(s): 200
response == {
"name": "str"
}
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
Expand Down Expand Up @@ -402,14 +386,6 @@ def _no_decorator_in_internal( # pylint: disable=protected-access
MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models._models.NoDecoratorModelInInternal
:raises ~azure.core.exceptions.HttpResponseError:
Example:
.. code-block:: python
# response body for status code(s): 200
response == {
"name": "str"
}
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
Expand Down Expand Up @@ -477,14 +453,6 @@ def _internal_decorator_in_internal( # pylint: disable=protected-access
:rtype:
~specs.azure.clientgenerator.core.access.models._models.InternalDecoratorModelInInternal
:raises ~azure.core.exceptions.HttpResponseError:
Example:
.. code-block:: python
# response body for status code(s): 200
response == {
"name": "str"
}
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
Expand Down Expand Up @@ -549,14 +517,6 @@ def _public_decorator_in_internal(self, *, name: str, **kwargs: Any) -> _models.
MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models.PublicDecoratorModelInInternal
:raises ~azure.core.exceptions.HttpResponseError:
Example:
.. code-block:: python
# response body for status code(s): 200
response == {
"name": "str"
}
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
Expand Down Expand Up @@ -634,14 +594,6 @@ def public(self, *, name: str, **kwargs: Any) -> _models.SharedModel:
:return: SharedModel. The SharedModel is compatible with MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models.SharedModel
:raises ~azure.core.exceptions.HttpResponseError:
Example:
.. code-block:: python
# response body for status code(s): 200
response == {
"name": "str"
}
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
Expand Down Expand Up @@ -701,14 +653,6 @@ def _internal(self, *, name: str, **kwargs: Any) -> _models.SharedModel:
:return: SharedModel. The SharedModel is compatible with MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models.SharedModel
:raises ~azure.core.exceptions.HttpResponseError:
Example:
.. code-block:: python
# response body for status code(s): 200
response == {
"name": "str"
}
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
Expand Down Expand Up @@ -797,17 +741,6 @@ def _operation(self, *, name: str, **kwargs: Any) -> _models._models.OuterModel:
:return: OuterModel. The OuterModel is compatible with MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models._models.OuterModel
:raises ~azure.core.exceptions.HttpResponseError:
Example:
.. code-block:: python
# response body for status code(s): 200
response == {
"inner": {
"name": "str"
},
"name": "str"
}
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
Expand Down Expand Up @@ -877,21 +810,6 @@ def _discriminator( # pylint: disable=protected-access
:return: AbstractModel. The AbstractModel is compatible with MutableMapping
:rtype: ~specs.azure.clientgenerator.core.access.models._models.AbstractModel
:raises ~azure.core.exceptions.HttpResponseError:
Example:
.. code-block:: python
# The response is polymorphic. The following are possible polymorphic responses based
off discriminator "kind":
# JSON input template for discriminator value "real":
abstract_model = {
"kind": "real",
"name": "str"
}
# response body for status code(s): 200
response == abstract_model
"""
error_map: MutableMapping[int, Type[HttpResponseError]] = {
401: ClientAuthenticationError,
Expand Down
Loading

0 comments on commit 6a25cc3

Please sign in to comment.